import{A as e,B as t,O as n,St as r,Z as i,c as a,h as o,l as s,m as c,o as l,p as u,r as d,rt as f,s as p,u as m,yt as h}from"./runtime-core.esm-bundler-A2Q6NZG4.js";import{n as g,r as _,t as v}from"./screenPreferenceStore--2VZeKrE.js";import{o as y,t as b}from"./vue-router-Bd1zjzX-.js";import{t as x}from"./_plugin-vue_export-helper-BDNMzG2s.js";var S={class:`ks-home`},C={class:`ks-home__section`,"aria-labelledby":`ks-home-attention-title`},w={key:0,class:`ks-home__attention-list`,role:`list`},T={class:`badge`},E={class:`main`},D={key:1,class:`ks-home__empty`},O={class:`ks-home__section`,"aria-labelledby":`ks-home-workbench-title`},k={key:0,class:`ks-home__workbench-list`,role:`list`},A={class:`source`},j={class:`main`},M={key:1,class:`ks-home__empty`},N={class:`ks-home__all`,"aria-label":`전체 업무`},P={class:`ks-home__modules`},F={class:`ks-home__module-links`},I=[`aria-pressed`,`aria-label`,`onClick`],L=x(o({__name:`HomePage`,setup(o){let x=y(),L=l(()=>g(x.getRoutes()).filter(e=>!e.internalOnly)),R=l(()=>_(L.value)),z=v(),B=l(()=>new Map(L.value.map(e=>[e.screenId,e]))),V=l(()=>z.favoriteScreenIds.map(e=>B.value.get(e)).filter(e=>!!e)),H=l(()=>z.recents.map(e=>B.value.get(e.screenId)).filter(e=>!!e).filter(e=>!V.value.some(t=>t.screenId===e.screenId))),U=l(()=>[...V.value,...H.value].slice(0,10)),W=i([]);return(i,o)=>(n(),m(`article`,S,[o[3]||=p(`header`,{class:`ks-home__header`},[p(`div`,null,[p(`p`,null,`K-ArtSell Aegis`),p(`h1`,null,`홈`),p(`span`,null,`업무를 검색하고, 이어서 처리하고, 즐겨찾기로 자주 쓰는 화면에 바로 접근합니다.`)])],-1),p(`section`,C,[o[0]||=p(`header`,null,[p(`h2`,{id:`ks-home-attention-title`},`확인 필요`)],-1),W.value.length>0?(n(),m(`div`,w,[(n(!0),m(d,null,e(W.value,e=>(n(),a(f(b),{key:e.id,to:e.path,role:`listitem`,class:h([`ks-home__attention-item`,`severity-${e.severity}`])},{default:t(()=>[p(`span`,T,r(e.count),1),p(`span`,E,[p(`b`,null,r(e.title),1),p(`small`,null,r(e.module),1)])]),_:2},1032,[`to`,`class`]))),128))])):(n(),m(`p`,D,`현재 확인할 작업이나 알림이 없습니다.`))]),p(`section`,O,[p(`header`,null,[o[1]||=p(`h2`,{id:`ks-home-workbench-title`},`바로 시작`,-1),p(`small`,null,`즐겨찾기 `+r(V.value.length)+` · 최근 `+r(H.value.length),1)]),U.value.length?(n(),m(`div`,k,[(n(!0),m(d,null,e(U.value,e=>(n(),a(f(b),{key:e.screenId,to:e.path,role:`listitem`,class:`ks-home__workbench-item`},{default:t(()=>[p(`span`,A,r(V.value.some(t=>t.screenId===e.screenId)?`즐겨찾기`:`최근`),1),p(`span`,j,[p(`b`,null,r(e.title),1),p(`small`,null,r(e.module),1)])]),_:2},1032,[`to`]))),128))])):(n(),m(`p`,M,`아직 즐겨찾기하거나 최근에 연 화면이 없습니다. 아래에서 화면을 찾아보세요.`))]),p(`section`,N,[o[2]||=p(`header`,null,[p(`h2`,null,`모듈별 업무`)],-1),p(`div`,P,[(n(!0),m(d,null,e(R.value,i=>(n(),m(`section`,{key:i.module,class:`ks-home__module`},[p(`header`,null,[p(`strong`,null,r(i.module),1),p(`small`,null,r(i.entries.length)+`개 화면`,1)]),p(`div`,F,[(n(!0),m(d,null,e(i.entries,e=>(n(),m(`div`,{key:e.screenId,class:`ks-home__module-row`},[c(f(b),{class:`launch`,to:e.path},{default:t(()=>[u(r(e.title),1)]),_:2},1032,[`to`]),e.favoriteAllowed?(n(),m(`button`,{key:0,type:`button`,class:`favorite`,"aria-pressed":f(z).isFavorite(e.screenId),"aria-label":f(z).isFavorite(e.screenId)?`${e.title} 즐겨찾기 해제`:`${e.title} 즐겨찾기 추가`,onClick:t=>f(z).toggleFavorite(e.screenId)},r(f(z).isFavorite(e.screenId)?`★`:`☆`),9,I)):s(``,!0)]))),128))])]))),128))])])]))}}),[[`__scopeId`,`data-v-f342efac`]]);export{L as default};