1import{u as g,r as d,j as s}from"./index-DMTSLr9O.js";import{L as b}from"./LMSLayout-DVcuaCDx.js";/* empty css */import"./LMSSidebar-DvoCer1q.js";const I=()=>{const{t}=g(),[i,h]=d.useState([{id:1,name:"íìµ ìë£",color:"#3b82f6",createdDate:"2024-03-01"},{id:2,name:"ì°¸ê³ ë§í¬",color:"#10b981",createdDate:"2024-03-05"},{id:3,name:"ì¤ì 문ì",color:"#f59e0b",createdDate:"2024-03-10"}]),[a,p]=d.useState([{id:1,title:"Python ê¸°ì´ ê°ì ìë£",url:"/lms/courses/1/lesson/5",type:"lesson",folderId:1,addedDate:"2024-03-12",description:"Python ë³ìì ë°ì´í° íì
ì ëí ìì¸í ì¤ëª
"},{id:2,title:"MDN Web Docs - JavaScript",url:"https://developer.mozilla.org/ko/docs/Web/JavaScript",type:"external",folderId:2,addedDate:"2024-03-11",description:"JavaScript ê³µì 문ì ë° íí 리ì¼"},{id:3,title:"ê³¼ì ì ì¶ ê°ì´ë",url:"/lms/guides/assignment-submission",type:"document",folderId:3,addedDate:"2024-03-10",description:"ê³¼ì ì ì¶ ë°©ë²ê³¼ 주ìì¬í"},{id:4,title:"ì¹ ê°ë° ì¤ìµ íì´ì§",url:"/lms/courses/2/practice",type:"page",folderId:null,addedDate:"2024-03-09",description:"HTML/CSS ì¤ìµì ìí íì´ì§"}]),[n,c]=d.useState(""),[j,o]=d.useState(!1),[r,x]=d.useState(null),u=()=>{if(n.trim()){const e={id:Date.now(),name:n,color:"#6366f1",createdDate:new Date().toISOString().split("T")[0]};h([...i,e]),c(""),o(!1)}},f=e=>{confirm("ì´ í´ë를 ìì íìê² ìµëê¹? í´ë ìì ì¦ê²¨ì°¾ê¸°ë 미ë¶ë¥ë¡ ì´ëë©ëë¤.")&&(h(i.filter(l=>
1l.id!==e)),p(a.map(l=>l.folderId===e?{...l,folderId:null}:l)))},N=e=>{p(a.filter(l=>l.id!==e))},v=e=>{switch(e){case"lesson":return"ð¥";case"document":return"ð";case"page":return"ð";case"external":return"ð";default:return"ð"}},m=r?a.filter(e=>e.folderId===r):a.filter(e=>e.folderId===null),y=e=>a.filter(l=>l.folderId===e).length;return s.jsx(b,{children:s.jsxs("div",{className:"lms-content-wrapper",children:[s.jsxs("div",{className:"favorites-header",children:[s.jsx("h1",{className:"page-title",children:t("ì¦ê²¨ì°¾ê¸°")}),s.jsx("p",{className:"page-subtitle",children:t("ì주 ì¬ì©íë íì´ì§ì íìµ ìë£ë¥¼ í´ëë³ë¡ ì 리íì¸ì")})]}),s.jsxs("div",{className:"favorites-content",children:[s.jsxs("div",{className:"folders-section",children:[s.jsxs("div",{className:"section-header",children:[s.jsx("h2",{className:"section-title",children:t("í´ë")}),s.jsxs("button",{className:"add-folder-btn",onClick:()=>o(!0),children:["+ ",t("í´ë ì¶ê°")]})]}),j&&s.jsxs("div",{className:"new-folder-form",children:[s.jsx("input",{type:"text",placeholder:t("í´ë ì´ë¦ì ì
ë ¥íì¸ì"),value:n,onChange:e=>c(e.target.value),onKeyPress:e=>e.key==="Enter"&&u()}),s.jsx("button",{onClick:u,children:t("ìì±")}),s.jsx("button",{onClick:()=>{o(!1),c("")},children:t("ì·¨ì")})]}),s.jsxs("div",{className:"folders-grid",children:[s.jsxs("div",{className:`folder-card ${r===null?"active":""}`,onClick:()=>x(null),children:[s.jsx("div",{className:"folder-icon",style:{color:"#64748b"},children:"ð"}),s.jsxs("div",{className:"folder-info",children:[s.jsx("h3",{className:"folder-name",children:t("미ë¶ë¥")}),s.jsxs("span",{className:"folder-count",children:[a.filter(e=>e.folderId===null).length,"ê° í목"]})]})]}),i.map(e=>s.jsxs("div",{className:`folder-card ${r===e.id?"active":""}`,onClick:()=>x(e.id),children:[s.jsx("div",{className:"folder-icon",style:{color:e.color},children:"ð"}),s.jsxs("div",{className:"folder-info",children:[s.jsx("h3",{className:"folder-name",children:e.name}),s.jsxs("span",{className:"folder-count",children:[y(e.id),"ê° í목"]})]}),s.jsx("button",{className:"delete-folder-btn",onClick:l=>{l.stopPropagation(),f(e.id)},children:"â"})]},e.id))]})]}),s.jsxs("div",{className:"favorites-section",children:[s.jsxs("div",{className:"section-header",children:[s.jsx("h2",{className:"section-title",children:r?i.find(e=>e.id===r)?.name||t("í´ë"):t("미ë¶ë¥")}),s.jsxs("span",{className:"items-count",children:[m.length,"ê° í목"]})]}),m.length===0?s.jsxs("div",{className:"empty-favorites",children:[s.jsx("div",{className:"empty-icon",children:"ð"}),s.jsx("h3",{children:t("ì¦ê²¨ì°¾ê¸°ê° ììµëë¤")}),s.jsx("p",{children:t("íìµ ì¤ ì ì©í íì´ì§ë ìë£ë¥¼ ì¦ê²¨ì°¾ê¸°ì ì¶ê°íì¸ì.")})]}):s.jsx("div",{className:"favorites-list",children:m.map(e=>s.jsxs("div",{className:"favorite-item",children:[s.jsx("div",{className:"favorite-icon",children:v(e.type)}),s.jsxs("div",{className:"favorite-content",children:[s.jsx("h3",{className:"favorite-title",children:s.jsx("a",{href:e.url,target:e.type==="external"?"_blank":"_self",rel:e.type==="external"?"noopener noreferrer":void 0,children:e.title})}),e.description&&s.jsx("p",{className:"favorite-description",children:e.description}),s.jsxs("div",{className:"favorite-meta",children:[s.jsxs("span",{className:"favorite-date",children:[t("ì¶ê°ì¼"),": ",e.addedDate]}),s.jsxs("span",{className:"favorite-type",children:[e.type==="lesson"&&t("ê°ì"),e.type==="document"&&t("문ì"),e.type==="page"&&t("íì´ì§"),e.type==="external"&&t("ì¸ë¶ë§í¬")]})]})]}),s.jsx("button",{className:"remove-favorite-btn",onClick:()=>N(e.id),title:t("ì¦ê²¨ì°¾ê¸° ì ê±°"),children:"â"})]},e.id))})]})]})]})})};export{I as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.