1import{a as v,y as w,w as f,x as i,r as l,b as P,c as S,gw as D,j as e,X as T,k as I,o as $,T as q,P as L,n as p,bG as E,e as H,aN as N,aP as A,t as g,D as M,an as F,fh as Q,h3 as R,N as B}from"./index-aREvobyF.js";import{P as G}from"./PageMetaHeader-6lUw-EYb.js";import{S as K}from"./SimpleTable-DF7EMZw0.js";import{P as x,R as y}from"./RequiredCheckbox-CmovvdTt.js";import"./link-box-DcUyRFYn.js";import"./table-BqH1TAsn.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="506167c3-d66c-463c-a322-51b93a80731c",t._sentryDebugIdIdentifier="sentry-dbid-506167c3-d66c-463c-a322-51b93a80731c")}catch{}const O=t=>{const s=["ì¤ê³ ë´ì©"];return t.homework_file_count>0&&s.push("íì ê³¼ì 물"),t.scoring_count>0&&s.push("ì±ì ë´ì"),t.feedback_record_count>0&&s.push("ì±ì ë´ì"),t.has_course_share_comments&&s.push("ê³µë íê° ë´ì"),s.join(", ")},V=({courseKey:t})=>{const s=v(),c=w(),{data:r}=f(i.courses.detail({courseKey:t})),{data:n}=f(i.courses.detail({courseKey:t})._ctx.deletingConfirm),[u,b]=l.useState(!1),[d,C]=l.useState(!1),a=P(),{mutate:j,isPending:h}=S({mutationFn:()=>D.appsCoursesApiDeleteCourse({courseKey:t})});if(!r||!n)return e.jsx(e.Fragment,{});const m=n.projects.length>0,_=u&&(!m||d),k=()=>{j(void 0,{onSuccess:()=>{a.onClose(),g.create({title:"ìì ì´ ìì ëììµëë¤.",type:"success"}),c.invalidateQueries({queryKey:i.courses.list().queryKey}),c.invalidateQueries({queryKey:i.users.profile._ctx.teacher.queryKey}),s("/teachers/home")},onError:o=>{g.create({title:M(o),type:"error"})}})};return e.jsxs(T,{w:"full",alignItems:"flex-end",rowGap:6,children:[e.jsxs(I,{bg:"white",p:7,rounded:"xl",boxShadow:"sm",rowGap:7,w:"full","data-testid":"course-delete-confirm-content",children:[e.jsx(x,{title:"1. ìì í ìì ê³¼ í¨ê» ì¬ë¼ì§ë ë°ì´í°ë¥¼ íì¸í´ 주ì¸ì.",description:"ìì ì ìì íë©´ 복구í ì ììµëë¤. ìë ìì ë²ì를 ê¼ íì¸í´ 주ì¸ì.",listItems:[{label:"ìì í ìì ",value:`${r.name} (${r.year}íë ë ${r.semester}í기)`},{label:"ê´ì°° 기ë¡",value:`${n.member_snippet_count}ê±´`,isHighlighted:!0},{label:"ìííê°",value:`${n.projects.length}ê°`,isHighlighted:!0},{label:"ì¸ë¶ë¥ë ¥ ë° í¹ê¸°ì¬í 기ë¡",value:`${n.course_record_count}ëª ì 기ë¡`,isHighlighted:!0},...n.course_share_comment_count>0?[{label:"ê³µë íê°",value:`ëê¸ ${n.course_share_comment_count}ê°`,isHighlighted:!0}]:[]],children:e.jsx(y,{checked:u,onCheckedChange:b,children:"ë¤, ìì ë²ì를 íì¸íìµëë¤."})}),m&&e.jsxs(e.Fragment,{children:[e.jsx($,{}),e.jsxs(x,{title:"2. ìì ëë ìííê° ë´ì íê° ë°ì´í°ë¥¼ íì¸í´ 주ì¸ì.",children:[e.jsx(K,{w:"full",tableLayout:"fixed",scrollable:!1,header:{columns:[{key:"name",children:"ìííê°ëª ",textAlign:"center",w:"clamp(128px, 40vw, 420px)"},{key:"data",children:"í¨ê» ìì ëë ë°ì´í°",textAlign:"center",minWidth:"320px"}]},rows:n.projects.map(o=>({key:o.project_name,cells:[{key:"name",children:e.jsx(q,{lineClamp:1,children:o.project_name}),textAlign:"center"},{key:"data",children:O(o),textAlign:"center"}]}))}),e.jsx(y,{checked:d,onCheckedChange:C,children:"ë¤, ìì ë²ì를 íì¸íìµëë¤."})]})]})]}),e.jsxs(L,{justify:"flex-end",gap:3,children:[e.jsxs(p,{circle:!0,variant:"outline",colorPalette:"gray",onClick:()=>s(-1),children:[e.jsx(E,{}),"ì´ì ì¼ë¡"]}),e.jsxs(p,{circle:!0,colorPalette:"red",disabled:!_,loading:h,onClick:a.onOpen,children:[e.jsx(H,{as:N}),"ìì ìì "]})]}),e.jsx(A,{modalType:"negative",title:`ì ë§ ${r.name} ìì ì ìì í ê¹ì?`,description:`ìì íë©´ ìì ë´ì ë°ì´í°ë¤ì´ 2모ë ì구 ìì ëë©°, ë¤ì ëë릴 ì ìì´ì.`,cancelButton:{label:"ìëì¤"},confirmButton:{label:"ë¤, ìì í©ëë¤",onConfirm:k,buttonProps:{loading:h}},trigger:{open:a.open,onOpen:a.onOpen,onClose:a.onClose}})]})},Z=()=>{const{courseKey:t}=F(),s=Q(R);return l.useEffect(()=>(s(!1),()=>{s(!0)}),[s]),t?e.jsxs(e.Fragment,{children:[e.jsx(G,{title:"ìì ìì ìë´ ë° íì¸",description:"ìì íë©´ ìì ì 모ë íê° ë°ì´í°ê° í¨ê» ì¬ë¼ì§ë©° 복구í ì ììµëë¤. ìì ëë ë°ì´í°ë¥¼ íì¸í´ 주ì¸ì.",backLink:"-1"}),e.jsx(V,{courseKey:t})]}):e.jsx(B,{replace:!0,to:"/teachers/home"})};export{Z as default}; 3//# sourceMappingURL=CourseDeletePage-IrJ9pnhS.js.map
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.