(()=>{"use strict";const o=window.wp.blocks,e=window.wp.primitives,i=window.ReactJSXRuntime,t=(0,i.jsx)(e.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(e.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})}),c=JSON.parse('{"UU":"woocommerce-bookings/booking-location"}'),n=window.wp.blockEditor,r=window.wp.coreData,s=window.wp.i18n;function a(o){var e,i,t="";if("string"==typeof o||"number"==typeof o)t+=o;else if("object"==typeof o)if(Array.isArray(o)){var c=o.length;for(e=0;e<c;e++)o[e]&&(i=a(o[e]))&&(t&&(t+=" "),t+=i)}else for(i in o)o[i]&&(t&&(t+=" "),t+=i);return t}const l=function(){for(var o,e,i=0,t="",c=arguments.length;i<c;i++)(o=arguments[i])&&(e=a(o))&&(t&&(t+=" "),t+=e);return t},w=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];(0,o.registerBlockType)(c.UU,{icon:t,edit:({attributes:o,setAttributes:e,isSelected:t,context:c})=>{const a="default"===(0,n.useBlockEditingMode)(),{prefix:d,suffix:m,textAlign:x}=o,f=(0,n.useBlockProps)({className:l({[`has-text-align-${x}`]:x})}),{postId:g}=c,{record:p}=(0,r.useEntityRecord)("root","product",g),u=p?.booking_location||"Booking Location";return(0,i.jsxs)(i.Fragment,{children:[a&&(0,i.jsx)(n.BlockControls,{children:(0,i.jsx)(n.AlignmentToolbar,{value:x,onChange:o=>{e({textAlign:o})}})}),(0,i.jsxs)("div",{...f,children:[(t||d)&&(0,i.jsx)(n.RichText,{className:"wc-bookings-block-components-booking-location__prefix",allowedFormats:w,tagName:"span",placeholder:(0,s.__)("Prefix","woocommerce")+" ","aria-label":(0,s.__)("Prefix","woocommerce"),value:d,onChange:o=>e({prefix:o})}),(0,i.jsx)("span",{children:u}),(t||m)&&(0,i.jsx)(n.RichText,{className:"wc-bookings-block-components-booking-location__suffix",allowedFormats:w,tagName:"span",placeholder:" "+(0,s.__)("Suffix","woocommerce"),"aria-label":(0,s.__)("Suffix","woocommerce"),value:m,onChange:o=>e({suffix:o})})]})]})}})})();