(()=>{"use strict";var e={d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{LayoutContext:()=>y,LayoutContextProvider:()=>w,WC_FOOTER_SLOT_NAME:()=>l,WC_HEADER_NAVIGATION_SLOT_NAME:()=>u,WC_HEADER_PAGE_TITLE_SLOT_NAME:()=>s,WC_HEADER_SLOT_NAME:()=>i,WooFooterItem:()=>a,WooHeaderItem:()=>c,WooHeaderNavigationItem:()=>m,WooHeaderPageTitle:()=>_,getLayoutContextValue:()=>E,useExtendLayout:()=>O,useLayoutContext:()=>p});const r=window.wp.components,o=window.wp.element,n=window.wc.components,l="woocommerce_footer_item",a=e=>{let{children:t,order:a=1}=e;return(0,o.createElement)(r.Fill,{name:l},(e=>(0,n.createOrderedChildren)(t,a,e)))};a.Slot=e=>{let{fillProps:t}=e;return(0,o.createElement)(r.Slot,{name:l,fillProps:t},n.sortFillsByOrder)};const i="woocommerce_header_item",d=e=>e&&e.length?`${i}/${e}`:i,c=e=>{let{children:t,order:l=1,name:a=""}=e;return(0,o.createElement)(r.Fill,{name:d(a)},(e=>(0,n.createOrderedChildren)(t,l,e)))};c.Slot=e=>{let{fillProps:t,name:l=""}=e;return(0,o.createElement)(r.Slot,{name:d(l),fillProps:t},n.sortFillsByOrder)};const u="woocommerce_header_navigation_item",m=e=>{let{children:t,order:l=1}=e;return(0,o.createElement)(r.Fill,{name:u},(e=>(0,n.createOrderedChildren)(t,l,e)))};m.Slot=e=>{let{fillProps:t}=e;return(0,o.createElement)(r.Slot,{name:u,fillProps:t},n.sortFillsByOrder)};const s="woocommerce_header_page_title",_=e=>{let{children:t}=e;return(0,o.createElement)(r.Fill,{name:s},t)};_.Slot=e=>{let{fillProps:t}=e;return(0,o.createElement)(r.Slot,{name:s,fillProps:t},(e=>(0,o.createElement)(o.Fragment,null,[...e].pop())))};const y=(0,o.createContext)(void 0),E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{layoutParts:[...e],extendLayout:t=>{const r=[...e,t];return{...E(r),layoutParts:r}},layoutString:e.join("/"),isDescendantOf:t=>e.includes(t)}},w=e=>{let{children:t,value:r}=e;return(0,o.createElement)(y.Provider,{value:r},t)},p=()=>{const e=(0,o.useContext)(y);if(void 0===e)throw new Error("useLayoutContext must be used within a LayoutContextProvider");return e},O=e=>{const{extendLayout:t}=p();return(0,o.useMemo)((()=>t(e)),[t,e])};(window.wc=window.wc||{}).adminLayout=t})();