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