import{a3 as g,i as k,e as _,O as C,N as B,D as V,k as v,_ as x,r as s,o as l,c as u,F as D,a,b as r,d as i,w as p,f as y}from"./index-20f16f2f.js";import{D as S}from"./DateAndResourceTimeTable-5ccd4f8a.js";import"./timeline-435273bb.js";const T={name:"PageMasterTimetableDatetimeline",components:{DateAndResourceTimeTable:S},props:{date:{type:String,required:!0}},setup(f){const o=g(),m=k(v.resourceStore),e=k(v.generalTimetableScope),b=_(()=>m.resources.value.find(t=>t.id===e.classroom.value)??null),F=_(()=>m.resources.value.filter(t=>!t.disabled&&t.type==="teacher")),d=_({get:()=>{try{return V.fromISOFormat(f.date)}catch{return null}},set:t=>{t&&o.push(`./${t.isoFormat()}`)}});function c(t){d.value=t}return{add:C,timedelta:B,classroom:b,resources:F,date:d,setDate:c}}};const N={style:{display:"flex",gap:"1em"}},A={key:1},h={key:2};function w(f,o,m,e,b,F){const d=s("date-time"),c=s("input-date"),t=s("router-link"),E=s("date-and-resource-time-table");return l(),u(D,null,[e.classroom&&e.date?(l(),u(D,{key:0},[a("h1",null,[r(d,{value:e.date},null,8,["value"]),i("の時間割表")]),a("label",null,[i("日付"),r(c,{modelValue:e.date,"onUpdate:modelValue":o[0]||(o[0]=n=>e.date=n)},null,8,["modelValue"])]),a("button",{type:"button",onClick:o[1]||(o[1]=n=>e.setDate(e.add(e.date,e.timedelta({days:-1}))))}," ← "),a("button",{type:"button",onClick:o[2]||(o[2]=n=>e.setDate(e.add(e.date,e.timedelta({days:1}))))}," → "),a("button",{type:"button",onClick:o[3]||(o[3]=n=>e.setDate(e.add(e.date,e.timedelta({days:-7}))))}," ↞ "),a("button",{type:"button",onClick:o[4]||(o[4]=n=>e.setDate(e.add(e.date,e.timedelta({days:7}))))}," ↠ "),a("p",N,[r(t,{to:`/printingtimeline?classroom=${e.classroom.id}&mode=date-teacher&date=${e.date.isoFormat()}`},{default:p(()=>[i("印刷用")]),_:1},8,["to"]),r(t,{to:`/printingtimeline?classroom=${e.classroom.id}&mode=date-teacher&date=${e.date.isoFormat()}&hideconfidence=y`},{default:p(()=>[i(" 印刷用（外部送信用） ")]),_:1},8,["to"])]),r(E,{classroom:e.classroom,mode:"date",dates:[e.date],resources:e.resources,class:"timetable"},null,8,["classroom","dates","resources"])],64)):y("",!0),e.classroom?y("",!0):(l(),u("p",A,"教室が見つかりません。")),e.date?y("",!0):(l(),u("p",h,"日付の形式が不正です。"))],64)}const j=x(T,[["render",w],["__scopeId","data-v-8f606679"]]);export{j as default};
