(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[359],{kpjM:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.loaderSuspense,expression:"!loaderSuspense"}]},[n("skeleton-loader",{attrs:{width:"13rem",height:"3rem",animation:"fade",type:"rect",radius:6,rounded:!0}})],1),e._v(" "),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.loaderSuspense,expression:"loaderSuspense"}]},[e.openingTimes?n("tb-w-opening-times-parser",{key:e.id,staticClass:"text-left max-w-sm inline-flex",attrs:{"opening-times-format":"toubizV1","opening-times-definition":e.openingTimes},scopedSlots:e._u([{key:"default",fn:function(t){return[e.staticWidgetPath?n("a",{attrs:{href:e.staticWidgetPath}},[n("tb-w-opening-times-line-preview",{attrs:{"opening-times":t.openingTimes,"for-date-and-time":new Date}})],1):n("button",{on:{click:function(t){e.modalOpen=!0}}},[n("tb-w-opening-times-line-preview",{attrs:{"opening-times":t.openingTimes,"for-date-and-time":new Date}})],1)]}}],null,!1,3393805359)}):e._e(),e._v(" "),e.staticWidgetPath?e._e():n("tb-w-modal",{attrs:{show:e.modalOpen,title:e.$t("message.hoursOfOperation")},on:{close:function(t){e.modalOpen=!1}}},[n("tb-w-datepicker",{staticClass:"border-b border-gray-400 text-base pl-0 pr-0 pb-4",attrs:{icon:"calendar",density:"normal","icon-absolute":"","max-date":e.inOneYear},model:{value:e.date,callback:function(t){e.date=t},expression:"date"}}),e._v(" "),n("tb-w-opening-times-parser",{attrs:{"opening-times-format":"toubizV1","opening-times-definition":e.openingTimes},scopedSlots:e._u([{key:"default",fn:function(t){return[n("tb-w-opening-times-table",{staticClass:"mt-6",attrs:{"opening-times":t.openingTimes,"date-format":"dd.MM.yyyy","for-date-and-time":e.dateInstance}})]}}],null,!1,809509620)})],1)],1)])],1)};i._withStripped=!0;var s=n("L2JU"),a=n("o994"),o={props:{id:{type:String,required:!0}},data:()=>({openingTimes:null,modalOpen:!1,date:(new Date).toISOString().substr(0,10),loaderSuspense:!1}),computed:{...Object(s.e)(["staticWidgetPath"]),dateInstance(){return Object(a.f)(this.date)},inOneYear:()=>new Date((new Date).setFullYear((new Date).getFullYear()+1))},methods:{async fetchOpeningTimes(){this.openingTimes=null;try{const e=await this.articleRepository.fetch(this.id+"/openingTimes",{language:this.$store.state.language});this.openingTimes=e.payload}catch(e){console.error(e)}}},watch:{openingTimes(){this.openingTimes&&setTimeout(()=>{this.loaderSuspense=!0},300)},id:{immediate:!0,handler(e){this.fetchOpeningTimes(e)}}},i18n:{fallbackLocale:"de",silentFallbackWarn:"undefined"==typeof window,messages:{de:{message:{hoursOfOperation:"Öffnungszeiten"}},en:{message:{hoursOfOperation:"Hours of operation"}},fr:{message:{hoursOfOperation:"Heures d'ouverture"}},it:{message:{hoursOfOperation:"Orari di apertura"}},es:{message:{hoursOfOperation:"Horario de apertura"}},nl:{message:{hoursOfOperation:"Openingtijden"}},cs:{message:{hoursOfOperation:"hodiny operace"}}}}},r=n("KHd+"),d=Object(r.a)(o,i,[],!1,null,null,null);d.options.__file="node_modules/@newland/toubiz-widget/src/routes/openingtimes-live.vue";t.default=d.exports}}]);