(()=>{"use strict";var e={d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},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:()=>m,WC_HEADER_PAGE_TITLE_SLOT_NAME:()=>u,WC_HEADER_SLOT_NAME:()=>i,WooFooterItem:()=>a,WooHeaderItem:()=>c,WooHeaderNavigationItem:()=>s,WooHeaderPageTitle:()=>_,getLayoutContextValue:()=>E,useExtendLayout:()=>O,useLayoutContext:()=>p});const o=window.wp.components,r=window.wp.element,n=window.wc.components,l="woocommerce_footer_item",a=({children:e,order:t=1})=>(0,r.createElement)(o.Fill,{name:l},(o=>(0,n.createOrderedChildren)(e,t,o)));a.Slot=({fillProps:e})=>(0,r.createElement)(o.Slot,{name:l,fillProps:e},n.sortFillsByOrder);const i="woocommerce_header_item",d=e=>e&&e.length?`${i}/${e}`:i,c=({children:e,order:t=1,name:l=""})=>(0,r.createElement)(o.Fill,{name:d(l)},(o=>(0,n.createOrderedChildren)(e,t,o)));c.Slot=({fillProps:e,name:t=""})=>(0,r.createElement)(o.Slot,{name:d(t),fillProps:e},n.sortFillsByOrder);const m="woocommerce_header_navigation_item",s=({children:e,order:t=1})=>(0,r.createElement)(o.Fill,{name:m},(o=>(0,n.createOrderedChildren)(e,t,o)));s.Slot=({fillProps:e})=>(0,r.createElement)(o.Slot,{name:m,fillProps:e},n.sortFillsByOrder);const u="woocommerce_header_page_title",_=({children:e})=>(0,r.createElement)(o.Fill,{name:u},e);_.Slot=({fillProps:e})=>(0,r.createElement)(o.Slot,{name:u,fillProps:e},(e=>(0,r.createElement)(r.Fragment,null,[...e].pop())));const y=(0,r.createContext)(void 0),E=(e=[])=>({layoutParts:[...e],extendLayout:t=>{const o=[...e,t];return{...E(o),layoutParts:o}},layoutString:e.join("/"),isDescendantOf:t=>e.includes(t)}),w=({children:e,value:t})=>(0,r.createElement)(y.Provider,{value:t},e),p=()=>{const e=(0,r.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,r.useMemo)((()=>t(e)),[t,e])};(window.wc=window.wc||{}).adminLayout=t})();