"use strict";(self["webpackChunksalon_booking_plugin_pwa"]=self["webpackChunksalon_booking_plugin_pwa"]||[]).push([[728],{8728:function(s,o,p){p.r(o),p.d(o,{default:function(){return x}});var e=p(6436);const a={key:0};function n(s,o,p,n,i,t){const h=(0,e.g2)("ShopsList");return p.isShopsEnabled?((0,e.uX)(),(0,e.CE)("div",a,[(0,e.bF)(h,{isShopsEnabled:p.isShopsEnabled,onApplyShop:t.applyShop},null,8,["isShopsEnabled","onApplyShop"])])):(0,e.Q3)("",!0)}var i=p(7959);const t={class:"shops-screen"},h={class:"shops-header"},l={class:"shops-title"},d={class:"shops-body"},r={key:0,class:"loading-wrap"},c={key:1,class:"shops-list"},u={key:2,class:"empty-state"},m={class:"empty-title"};function y(s,o,p,a,n,y){const S=(0,e.g2)("b-spinner"),v=(0,e.g2)("ShopItem"),k=(0,e.g2)("font-awesome-icon");return(0,e.uX)(),(0,e.CE)("div",t,[(0,e.Lk)("div",h,[(0,e.Lk)("h1",l,(0,i.v_)(s.getLabel("shopsTitle")),1)]),(0,e.Lk)("div",d,[s.isLoading?((0,e.uX)(),(0,e.CE)("div",r,[(0,e.bF)(S,{variant:"primary"})])):s.shopsList.length>0?((0,e.uX)(),(0,e.CE)("div",c,[((0,e.uX)(!0),(0,e.CE)(e.FK,null,(0,e.pI)(s.shopsList,s=>((0,e.uX)(),(0,e.Wv)(v,{key:s.id,shop:s,onApplyShop:y.applyShop},null,8,["shop","onApplyShop"]))),128))])):((0,e.uX)(),(0,e.CE)("div",u,[(0,e.bF)(k,{icon:"fa-solid fa-store",class:"empty-icon"}),(0,e.Lk)("p",m,(0,i.v_)(s.getLabel("shopsNoResultLabel")),1)]))])])}const S={class:"shop-icon-wrap"},v={class:"shop-info"},k={class:"shop-name"},b={key:0,class:"shop-meta"},f={key:0},L={key:1},E={key:2},g={key:1,class:"shop-email-text"};function _(s,o,p,a,n,t){const h=(0,e.g2)("font-awesome-icon");return(0,e.uX)(),(0,e.CE)("div",{class:"shop-card",onClick:o[0]||(o[0]=(...s)=>t.applyShop&&t.applyShop(...s))},[(0,e.Lk)("div",S,[(0,e.bF)(h,{icon:"fa-solid fa-store",class:"shop-icon"})]),(0,e.Lk)("div",v,[(0,e.Lk)("div",k,(0,i.v_)(t.name),1),t.address||t.phone?((0,e.uX)(),(0,e.CE)("div",b,[t.address?((0,e.uX)(),(0,e.CE)("span",f,(0,i.v_)(t.address),1)):(0,e.Q3)("",!0),t.address&&t.phone?((0,e.uX)(),(0,e.CE)("span",L," · ")):(0,e.Q3)("",!0),t.phone?((0,e.uX)(),(0,e.CE)("span",E,(0,i.v_)(t.phone),1)):(0,e.Q3)("",!0)])):(0,e.Q3)("",!0),t.email?((0,e.uX)(),(0,e.CE)("div",g,(0,i.v_)(t.email),1)):(0,e.Q3)("",!0)]),(0,e.bF)(h,{icon:"fa-solid fa-chevron-right",class:"shop-chevron"})])}var C={name:"ShopItem",props:{shop:{default:function(){return{}}}},computed:{name(){return this.shop.name},address(){return this.shop.address},email(){return this.shop.email},phone(){return this.shop.phone}},methods:{applyShop(){this.$emit("applyShop",this.shop)}},emits:["applyShop"]},X=p(5932);const w=(0,X.A)(C,[["render",_],["__scopeId","data-v-75259819"]]);var A=w,F={name:"ShopsList",props:{isShopsEnabled:{type:Boolean,required:!0}},data:function(){return{shopsList:[],isLoading:!1}},mounted(){this.isShopsEnabled&&this.load()},components:{ShopItem:A},methods:{load(){this.isShopsEnabled&&(this.isLoading=!0,this.shopsList=[],this.axios.get("shops").then(s=>{this.shopsList=s.data.items}).finally(()=>{this.isLoading=!1}))},applyShop(s){this.$emit("applyShop",s)}},emits:["applyShop"]};const I=(0,X.A)(F,[["render",y],["__scopeId","data-v-af37a704"]]);var Q=I,$={name:"ShopsTab",props:{isShopsEnabled:{type:Boolean,required:!0}},components:{ShopsList:Q},methods:{applyShop(s){this.$emit("applyShop",s)}},emits:["applyShop"]};const q=(0,X.A)($,[["render",n]]);var x=q}}]);