import{e as w,v as C,c as l,a as s,b as _,t as a,f as d,n as x,F as k,r as y,E as $,o as c,C as q,m as v,H as u,d as B,_ as I}from"./DpdQcRr7.js";import"./BcpEzrWT.js";const K={class:"java-page"},M={class:"java-container"},N={class:"java-header"},V={class:"java-icon"},z={class:"progress-card"},E={class:"progress-top"},F={class:"progress-count"},J={class:"progress-track"},L={class:"phase-heading"},S={class:"phase-label"},D={class:"phase-question"},H={class:"chapter-list"},P=["onClick","onKeydown"],R={class:"chapter-no"},T={class:"chapter-icon"},A={class:"chapter-body"},G={class:"chapter-title"},O={class:"chapter-summary"},Q=w({__name:"index",setup(U){const r=[{key:"phase1",label:"フェーズ1 ・ 自作アイテム",question:"何が起きるか",chapters:[{no:1,title:"関数",summary:"「呼ばれる側」を書く。まずはコメントを外すだけ",icon:"mdi:function-variant",status:"cleared"},{no:2,title:"if",summary:"もし〜なら。いちばんよく使う魔法",icon:"mdi:call-split",status:"current"},{no:3,title:"乱数",summary:"10回に1回だけ、みたいな運まかせ",icon:"mdi:dice-5",status:"locked"},{no:4,title:"かつ・または",summary:"2つの条件を組み合わせる（&& ・ ||）",icon:"mdi:set-center",status:"locked"},{no:5,title:"for",summary:"「くり返し」で、まとめて計算する",icon:"mdi:repeat",status:"locked"},{no:6,title:"連想配列",summary:"キーごとに値をおぼえる（Map）",icon:"mdi:notebook-outline",status:"locked"},{no:7,title:"クラス",summary:"処理に名前をつけて、まとめる",icon:"mdi:package-variant-closed",status:"locked"}]},{key:"phase2",label:"フェーズ2 ・ 既存イベント",question:"誰に・いつ起きるか",chapters:[{no:8,title:"ガード節",summary:"条件に合わなければ帰る（早めに return）",icon:"mdi:shield-outline",status:"locked"},{no:9,title:"instanceof",summary:"「その型なら」を決まり文句で書く",icon:"mdi:help-rhombus-outline",status:"locked"},{no:10,title:"世界のイベント",summary:"入った・死んだ、みたいなタイミングで動く",icon:"mdi:earth",status:"locked"}]}],h=r.reduce((o,e)=>o+e.chapters.length,0),m=r.reduce((o,e)=>o+e.chapters.filter(n=>n.status==="cleared").length,0),g=Math.round(m/h*100),b={cleared:"クリア",current:"学習中",locked:"ロック"},f=C(),p=o=>{o.status!=="locked"&&f.push(`/user/java/${o.no}`)};return(o,e)=>{const n=$("Icon");return c(),l("div",K,[s("div",M,[s("header",N,[s("span",V,[_(n,{icon:"mdi:language-java",width:28,height:28})]),e[0]||(e[0]=s("div",{class:"java-heading"},[s("h1",{class:"java-title"},"Java学習"),s("p",{class:"java-sub"},"Modづくりに使う Java の基礎を、10章で身につけよう")],-1))]),s("section",z,[s("div",E,[e[1]||(e[1]=s("span",{class:"progress-label"},"全体の進み具合",-1)),s("span",F,a(d(m))+" / "+a(d(h))+" 章",1)]),s("div",J,[s("div",{class:"progress-fill",style:x({width:`${d(g)}%`})},null,4)])]),(c(),l(k,null,y(r,i=>s("section",{key:i.key,class:"phase-block"},[s("div",L,[s("h2",S,a(i.label),1),s("span",D,"— "+a(i.question),1)]),s("ul",H,[(c(!0),l(k,null,y(i.chapters,t=>(c(),l("li",{key:t.no,class:v(["chapter-card",[`is-${t.status}`]]),role:"button",tabindex:"0",onClick:j=>p(t),onKeydown:q(j=>p(t),["enter"])},[s("span",R,a(t.no),1),s("span",T,[_(n,{icon:t.icon,width:22,height:22},null,8,["icon"])]),s("div",A,[s("span",G,a(t.title),1),s("span",O,a(t.summary),1)]),s("span",{class:v(["chapter-status",`status-${t.status}`])},[t.status==="cleared"?(c(),u(n,{key:0,icon:"mdi:check-circle",width:16,height:16})):t.status==="locked"?(c(),u(n,{key:1,icon:"mdi:lock",width:15,height:15})):(c(),u(n,{key:2,icon:"mdi:pencil",width:15,height:15})),B(" "+a(b[t.status]),1)],2)],42,P))),128))])])),64))])])}}}),Y=I(Q,[["__scopeId","data-v-7c382332"]]);export{Y as default};
