this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["mini-cart"]=function(e){function t(t){for(var r,l,i=t[0],a=t[1],u=t[2],d=0,b=[];d{let{count:t}=e;return Object(r.createElement)("span",{className:"wc-block-mini-cart__quantity-badge"},Object(r.createElement)(i.a,{className:"wc-block-mini-cart__icon",size:20,icon:w}),Object(r.createElement)("span",{className:"wc-block-mini-cart__badge"},t))};const O={apiVersion:2,title:Object(o.__)("Mini Cart","woocommerce"),icon:{src:Object(r.createElement)(i.a,{icon:l,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woocommerce")],description:Object(o.__)("Display a mini cart widget.","woocommerce"),supports:{html:!1,multiple:!1,color:!0,typography:{fontSize:!0,...Object(u.b)()&&{__experimentalFontFamily:!0,__experimentalFontWeight:!0}}},example:{attributes:{isPreview:!0,className:"wc-block-mini-cart--preview"}},attributes:{isPreview:{type:"boolean",default:!1},addToCartBehaviour:{type:"string",default:"none"},hasHiddenPrice:{type:"boolean",default:!1},cartAndCheckoutRenderStyle:{type:"string",default:"hidden"}},edit:e=>{let{attributes:t,setAttributes:n}=e;const{addToCartBehaviour:c,hasHiddenPrice:l,cartAndCheckoutRenderStyle:i}=t,a=Object(s.useBlockProps)({className:"wc-block-mini-cart"}),u=void 0!==Object(g.useSelect)("core/edit-site"),w=Object(p.getSetting)("templatePartEditUri","");return Object(r.createElement)("div",a,Object(r.createElement)(s.InspectorControls,null,Object(r.createElement)(b.PanelBody,{title:Object(o.__)("Mini Cart Settings","woocommerce")},Object(r.createElement)(b.__experimentalToggleGroupControl,{className:"wc-block-mini-cart__add-to-cart-behaviour-toggle",label:Object(o.__)("Add-to-Cart behaviour","woocommerce"),value:c,onChange:e=>{n({addToCartBehaviour:e})},help:Object(o.__)("Select what happens when a customer adds a product to the cart.","woocommerce")},Object(r.createElement)(b.__experimentalToggleGroupControlOption,{value:"none",label:Object(o.__)("Do nothing","woocommerce")}),Object(r.createElement)(b.__experimentalToggleGroupControlOption,{value:"open_drawer",label:Object(o.__)("Open cart drawer","woocommerce")})),Object(r.createElement)(b.ToggleControl,{label:Object(o.__)("Hide Cart Price","woocommerce"),help:Object(o.__)("Toggles the visibility of the Mini Cart price.","woocommerce"),checked:l,onChange:()=>n({hasHiddenPrice:!l})}),u&&Object(r.createElement)(b.__experimentalToggleGroupControl,{className:"wc-block-mini-cart__render-in-cart-and-checkout-toggle",label:Object(o.__)("Mini Cart in cart and checkout pages","woocommerce"),value:i,onChange:e=>{n({cartAndCheckoutRenderStyle:e})},help:Object(o.__)("Select how the Mini Cart behaves in the Cart and Checkout pages. This might affect the header layout.","woocommerce")},Object(r.createElement)(b.__experimentalToggleGroupControlOption,{value:"hidden",label:Object(o.__)("Hide","woocommerce")}),Object(r.createElement)(b.__experimentalToggleGroupControlOption,{value:"removed",label:Object(o.__)("Remove","woocommerce")}))),w&&Object(r.createElement)(b.PanelBody,{title:Object(o.__)("Template settings","woocommerce")},Object(r.createElement)("p",null,Object(o.__)("Edit the appearance of the Mini Cart.","woocommerce")),Object(r.createElement)(b.ExternalLink,{href:w},Object(o.__)("Edit Mini Cart template part","woocommerce")))),Object(r.createElement)(m.a,null,Object(r.createElement)("button",{className:"wc-block-mini-cart__button"},!l&&Object(r.createElement)("span",{className:"wc-block-mini-cart__amount"},Object(d.formatPrice)(0)),Object(r.createElement)(f,{count:0}))))},save:()=>null};Object(a.registerBlockType)("woocommerce/mini-cart",O)},54:function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(0),l=n(69),i=n(122);const a=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:n={},...r}=e;const u=Object(c.useRef)(null),s=()=>{u.current&&l.focus.focusable.find(u.current).forEach(e=>{a.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(i.a)(s,0,{leading:!0});return Object(c.useLayoutEffect)(()=>{let e;return s(),u.current&&(e=new window.MutationObserver(d),e.observe(u.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(c.createElement)("div",o()({ref:u,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...n}},r),t)}},69:function(e,t){e.exports=window.wp.dom},7:function(e,t){e.exports=window.wp.data},8:function(e,t){e.exports=window.wp.blocks},90:function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return i}));var r=n(8),o=n(19);const c=(e,t)=>{if(o.n>2)return Object(r.registerBlockType)(e,t)},l=()=>o.n>2,i=()=>o.n>1}});