import{l as n,m as p}from"./CJ3Pvzvs.js";const h=n("issueStore",{state:()=>({currentLanguage:p().locale.value,currentIssue:void 0,issue:void 0,articles:[]}),actions:{setCurrentIssue(i){this.currentIssue=i,this.setArticles(i.articles)},setIssue(i){this.issue=i,this.setArticles(i.articles)},setArticles(i){i&&(i.sort((r,t)=>(r.startPage??0)-(t.startPage??0)),i.forEach(r=>{var t;(t=r.authors)==null||t.forEach(e=>{e.affiliationIndexes&&(e.affiliation=e.affiliationIndexes.map(o=>{var a;return(a=r==null?void 0:r.affiliations)==null?void 0:a[o-1]}).join(", "))})})),this.articles=u(i,"articleType")}}}),u=(i,r)=>{const t={};return i.filter(e=>e.articleType!=="Other").forEach(e=>{var a;const o=e[r];t[o]||(t[o]={articleType:e.articleType??"",icon:((a=c.find(l=>{var s;return l.articleType===((s=e.articleType)==null?void 0:s.replace(/\([^)]*\)/g,"").trim())}))==null?void 0:a.icon)??"material-symbols:other-admission-outline-sharp",articles:[]}),t[o].articles.push(e)}),i.filter(e=>e.articleType=="Other").forEach(e=>{var a;const o=e[r];t[o]||(t[o]={articleType:e.articleType??"",icon:((a=c.find(l=>{var s;return l.articleType===((s=e.articleType)==null?void 0:s.replace(/\([^)]*\)/g,"").trim())}))==null?void 0:a.icon)??"material-symbols:other-admission-outline-sharp",articles:[]}),t[o].articles.push(e)}),Object.values(t)},c=[{articleType:"Invited Review",icon:"material-symbols:center-focus-weak-rounded"},{articleType:"Original Article",icon:"iconoir:journal"},{articleType:"Case Report And Literature Review",icon:"iconoir:stats-report"},{articleType:"Image Article",icon:"material-symbols:clinical-notes-outline-sharp"},{articleType:"Letter To The Editor",icon:"solar:letter-line-duotone"},{articleType:"Letter to the Editor",icon:"solar:letter-line-duotone"},{articleType:"Editorial",icon:"icon-park-outline:editor"},{articleType:"Other",icon:"material-symbols:other-admission-outline-sharp"},{articleType:"Review Article",icon:"material-symbols-light:rate-review-outline-sharp"},{articleType:"Review",icon:"material-symbols-light:rate-review-outline-sharp"},{articleType:"Case Report",icon:"iconoir:stats-report"},{articleType:"Index",icon:"oui:index-mapping"},{articleType:"Editorial Commentary",icon:"solar:letter-line-duotone"},{articleType:"Letter To Editor",icon:"solar:letter-line-duotone"},{articleType:"Original Research",icon:"material-symbols:lab-research-sharp"},{articleType:"Full Issue PDF",icon:"material-symbols:picture-as-pdf-sharp"},{articleType:"Research Article",icon:"material-symbols-light:rate-review-outline-sharp"}];export{h as u};