1import{_ as E,b as S,c as s,o as n,a as r,e as l,Z as m,t as i,F as H,s as p,n as w,g as _}from"./index-sUPB-bMu.js";const y={name:"ScheduleCard",props:{day:{type:Object,required:!0}},data(){return{limitCard:3,cardLimitState:!0,newRecorrence:null}},computed:{hasSmallWidth(){return window.screen.width<320},alterLimit(){return this.cardLimitState?this.newRecorrence?.slice(0,this.limitCard):this.day.recorrencias},dayOfWeek(){switch(this.day.diaSemana){case 0:return this.$t("HOME.SCHEDULE.DAYS.SUNDAY");case 1:return this.$t("HOME.SCHEDULE.DAYS.MONDAY");case 2:return this.$t("HOME.SCHEDULE.DAYS.TUESDAY");case 3:return this.$t("HOME.SCHEDULE.DAYS.WEDNESDAY");case 4:return this.$t("HOME.SCHEDULE.DAYS.THURSDAY");case 5:return this.$t("HOME.SCHEDULE.DAYS.FRIDAY");case 6:return this.$t("HOME.SCHEDULE.DAYS.SATURDAY");default:return null}}},created(){this.newRecorrence=this.sortHour()},methods:{toggleMenu(){this.day.recorrencias.length>this.limitCard&&(this.cardLimitState=!this.cardLimitState)},compare(a,t){const d=new Date(a.hora).getUTCHours(),h=new Date(a.hora).getUTCMinutes(),u=new Date(t.hora).getUTCHours(),o=new Date(t.hora).getUTCMinutes(),c=new Date().setUTCHours(d,h),e=new Date().setUTCHours(u,o);if(c===e){const D=new Date().setUTCHours(a.tempoDuracaoHora,a.tempoDuracaoMinutos),C=new Date().setUTCHours(t.tempoDuracaoHora,t.tempoDuracaoMinutos);return D-C}return c-e},sortHour(){return this.day.recorrencias.sort(this.compare)}}},M={class:"card"},A={class:"card-top"},L=["textContent"],U={class:"card-content"},f={class:"item__title"},g={class:"item__info"},k={key:0,class:"item__info__duration"},O={key:0,class:"card-down"},T={key:0,class:"card-down__button__content"},Y={key:1,class:"card-down__button__content"};function v(a,t,d,h,u,o){const c=S("SvgElement");return n(),s("article",M,[r("div",A,[m(i(o.dayOfWeek)+" ",1),d.day.data?(n(),s("div",{key:0,class:"card-top__date",textContent:i(a.$dayjs.utc(d.day.data).format("L"))},null,8,L)):l("",!0)]),r("div",U,[(n(!0),s(H,null,p(o.alterLimit,e=>(n(),s("div",{key:e.diaSemana,class:w(["item",{"item--small-width":o.hasSmallWidth}])},[r("p",f,i(e.titulo),1),r("div",g,[_(c,{type:"icon",name:"Clock",title:"Clock",class:"icon-clock"}),r("time",null,i(a.$dayjs.utc(e.hora).format("LT")),1),e.tempoDuracaoHora||e.tempoDuracaoMinutos?(n(),s("span",k,[t[1]||(t[1]=r("p",null,"-",-1)),r("time",null,i(a.$dayjs.utc(e.hora).add(e.tempoDuracaoHora,"h").add(e.tempoDuracaoMinutos,"m").format("LT")),1)])):l("",!0)]),t[2]||(t[2]=r("div",{class:"item__background"},null,-1))],2))),128))]),d.day.recorrencias.length>u.limitCard?(n(),s("div",O,[t[3]||(t[3]=r("div",{class:"card-down__line"},null,-1)),r("button",{class:"card-down__button",onClick:t[0]||(t[0]=(...e)=>o.toggleMenu&&o.toggleMenu(...e))},[u.cardLimitState?(n(),s("span",T,[m(i(a.$t("HOME.SCHEDULE.CARD.VIEW_MORE"))+" ",1),_(c,{type:"icon",name:"CirclePlus",title:"CirclePlus"})])):(n(),s("span",Y,[m(i(a.$t("HOME.SCHEDULE.CARD.VIEW_LESS"))+" ",1),_(c,{type:"icon",name:"CircleMinus",title:"CircleMinus"})]))])])):l("",!0)])}const R=E(y,[["render",v],["__scopeId","data-v-378b1e7f"]]);export{R 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.