"use strict";(self["webpackChunksalon_booking_plugin_pwa"]=self["webpackChunksalon_booking_plugin_pwa"]||[]).push([[396],{396:function(o,e,s){s.r(e),s.d(e,{default:function(){return a}});var t=s(6436);function i(o,e,s,i,n,l){const r=(0,t.g2)("EditBookingItem"),u=(0,t.g2)("BookingDetails"),m=(0,t.g2)("ImagesList"),c=(0,t.g2)("CustomerDetails"),g=(0,t.g2)("CustomersAddressBook");return(0,t.uX)(),(0,t.CE)("div",null,[o.editBooking?((0,t.uX)(),(0,t.Wv)(r,{key:0,booking:o.selectedBooking,customer:o.bookingCustomer,onClose:l.closeEditBooking},null,8,["booking","customer","onClose"])):o.showBooking?((0,t.uX)(),(0,t.Wv)(u,{key:1,show:!0,booking:o.selectedBooking,onClose:l.closeBookingDetails,onEdit:l.editBookingDetails},null,8,["booking","onClose","onEdit"])):o.isShowImages?((0,t.uX)(),(0,t.Wv)(m,{key:2,customer:o.customer,onClose:l.closeShowImages},null,8,["customer","onClose"])):o.editCustomer?((0,t.uX)(),(0,t.Wv)(c,{key:3,onClose:l.closeCustomerDetails,onShowBooking:l.showBookingDetails,customerID:o.customer.id,customerFirstname:o.customer.first_name,customerLastname:o.customer.last_name,customerEmail:o.customer.email,customerPhone:o.customer.phone,customerAddress:o.customer.address,customerPersonalNotes:o.customer.note},null,8,["onClose","onShowBooking","customerID","customerFirstname","customerLastname","customerEmail","customerPhone","customerAddress","customerPersonalNotes"])):((0,t.uX)(),(0,t.Wv)(g,{key:4,shop:s.shop,onShowImages:l.showImages,onEdit:l.edit,customer:o.customerData,ref:"customersAddressBook"},null,8,["shop","onShowImages","onEdit","customer"]))])}var n=s(39),l=s(7995),r=s(2749),u=s(5339),m=s(7202),c={name:"CustomersAddressBookTab",props:{shop:{default:function(){return{}}}},components:{CustomerDetails:r.A,CustomersAddressBook:n.A,ImagesList:l.A,BookingDetails:u.A,EditBookingItem:m.A},data:function(){return{isShowImages:!1,customer:null,customerData:null,editCustomer:!1,showBooking:!1,selectedBooking:null,editBooking:!1,bookingCustomer:null}},methods:{showImages(o){this.isShowImages=!0,this.customer=o,this.$emit("hideTabsHeader",!0)},closeShowImages(o){this.isShowImages=!1,this.customerData=o,this.$emit("hideTabsHeader",!1)},edit(o){console.log("🟣 CustomersAddressBookTab edit() called with customer:",o),console.log("🟣 Customer ID:",o.id),this.customer=o,this.editCustomer=!0},closeCustomerDetails(){this.editCustomer=!1,this.$refs.customersAddressBook&&this.$refs.customersAddressBook.load()},showBookingDetails(o){console.log("🟢 🟢 🟢 PARENT showBookingDetails called!",o),console.log("🟢 Current showBooking value:",this.showBooking),console.log("🟢 Setting showBooking to true and selectedBooking to:",o.id),this.selectedBooking=o,this.showBooking=!0,console.log("🟢 After setting - showBooking:",this.showBooking),console.log("🟢 After setting - selectedBooking:",this.selectedBooking)},closeBookingDetails(){this.showBooking=!1,this.selectedBooking=null},editBookingDetails(){console.log("🟡 editBookingDetails called for booking:",this.selectedBooking),this.bookingCustomer={id:this.selectedBooking.customer_id,first_name:this.selectedBooking.customer_first_name,last_name:this.selectedBooking.customer_last_name,email:this.selectedBooking.customer_email,phone:this.selectedBooking.customer_phone,phone_country_code:this.selectedBooking.customer_phone_country_code,address:this.selectedBooking.customer_address},this.editBooking=!0,this.showBooking=!1},closeEditBooking(){this.editBooking=!1,this.bookingCustomer=null,this.selectedBooking&&(this.showBooking=!0)}},emits:["hideTabsHeader"]},g=s(5932);const d=(0,g.A)(c,[["render",i]]);var a=d}}]);