FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
cozy-addons
/
cozy-blocks
/
dist
/
mega-menu
/
build
Edit File: index.js
(()=>{"use strict";var e,o={558:()=>{const e=window.wp.blocks,o=window.wp.i18n,n=window.wp.blockEditor,s=window.wp.compose,l=window.wp.element;function t(e,o){return`\n #${e}.display-horizontal .cozy-menu-wrapper {\n gap: ${o.menuGap}px;\n }\n\n #${e} {\n padding: ${o.menuStyles.padding.top}px ${o.menuStyles.padding.right}px ${o.menuStyles.padding.bottom}px ${o.menuStyles.padding.left}px;\n border-width: ${o.menuStyles.borderWidth}px;\n border-style: ${o.menuStyles.borderType};\n border-color: ${o.menuStyles.borderColor};\n border-radius: ${o.menuStyles.borderRadius}px;\n background-color: ${o.menuStyles.bgColor};\n }\n\n #${e} .cozy-menu-wrapper > .wp-block-navigation-item {\n padding: ${o.menuStyles.itemPadding.top}px ${o.menuStyles.itemPadding.right}px ${o.menuStyles.itemPadding.bottom}px ${o.menuStyles.itemPadding.left}px;\n border-radius: ${o.menuStyles.itemBorderRadius}px;\n }\n \n #${e} .wp-block-navigation-item li.wp-block-navigation-item:not(:last-child) {\n margin-bottom: ${o.submenuStyles.itemSpacing}px;\n }\n #${e} .cozy-block-navigation-menu.full-screen li.wp-block-navigation-item:not(:last-child) {\n margin-bottom: ${o.responsive.gap}px;\n }\n #${e}.display-vertical .cozy-block-navigation-menu:not(.full-screen) .cozy-menu-wrapper > .wp-block-navigation-item {\n width: ${o.menuWidth}px;\n }\n\n #${e}.display-vertical .cozy-block-navigation-menu:not(.full-screen) .cozy-mega-menu__item .cozy-block-mega-menu__dropdown {\n left: ${o.menuWidth}px;\n width: ${o.dropdownWidth}px;\n }\n\n #${e} .wp-block-navigation__submenu-container {\n min-width: ${o.submenuStyles.minWidth}px;\n border-width: ${o.submenuStyles.borderWidth}px;\n border-style: ${o.submenuStyles.borderType};\n border-color: ${o.submenuStyles.borderColor};\n border-radius: ${o.submenuStyles.borderRadius}px;\n background-color: ${o.submenuStyles.bgColor};\n }\n #${e} .wp-block-navigation__submenu-container .wp-block-navigation-item {\n padding: ${o.submenuStyles.padding.top}px ${o.submenuStyles.padding.right}px ${o.submenuStyles.padding.bottom}px ${o.submenuStyles.padding.left}px;\n }\n #${e}.submenu-has-box-shadow .wp-block-navigation__submenu-container {\n box-shadow: ${o.submenuStyles.boxShadow.horizontal}px ${o.submenuStyles.boxShadow.vertical}px ${o.submenuStyles.boxShadow.blur}px ${o.submenuStyles.boxShadow.spread}px ${o.submenuStyles.boxShadow.color} ${o.submenuStyles.boxShadow.position};\n }\n #${e} .wp-block-navigation__submenu-container .wp-block-navigation-item:hover {\n background-color: ${o.submenuStyles.itemHoverColor};\n }\n #${e} .wp-block-navigation__submenu-container .wp-block-navigation-item:hover .wp-block-navigation-item__content {\n color: ${o.submenuStyles.textHoverColor};\n }\n #${e}.display-vertical .cozy-menu-wrapper > .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container {\n left: ${o.menuWidth}px;\n }\n #${e}.display-horizontal .cozy-mega-menu__item .cozy-block-mega-menu__dropdown, #${e}.display-horizontal .cozy-menu-wrapper .wp-block-navigation__submenu-container {\n top: ${parseInt(o.contentGap)+40}px;\n }\n #${e}.display-horizontal.event-hover .cozy-mega-menu__item:hover .cozy-block-mega-menu__dropdown {\n padding-top: ${o?.megaMenuContentGap}px;\n }\n #${e}.display-horizontal.event-hover .wp-block-navigation-item.has-child:hover .wp-block-navigation__submenu-container, #${e}.display-horizontal .cozy-block-navigation-menu:not(.full-screen) .cozy-menu-wrapper > .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container.show-cozy-dropdown-content {\n top: ${o.contentGap}px;\n }\n\n #${e} .cozy-menu-wrapper > .wp-block-navigation-item.has-child > .cozy-dropdown-icon-wrapper,\n #${e} .cozy-menu-wrapper > .cozy-mega-menu__item > .cozy-dropdown-icon-wrapper {\n margin-left: ${o.icon.gap}px;\n }\n #${e} .cozy-dropdown-icon-wrapper {\n width: ${o.iconBoxStyles?.width};\n height: ${o.iconBoxStyles?.height};\n padding: ${o.iconBoxStyles.padding.top}px ${o.iconBoxStyles.padding.right}px ${o.iconBoxStyles.padding.bottom}px ${o.iconBoxStyles.padding.left}px;\n border: ${o.iconBoxStyles.borderWidth}px ${o.iconBoxStyles.borderType} ${o.iconBoxStyles.borderColor};\n border-radius: ${o.iconBoxStyles.borderRadius}px;\n background-color: ${o.iconBoxStyles.bgColor};\n\n & .cozy-dropdown-icon {\n width: ${o.icon.size}px;\n height: ${o.icon.size}px;\n opacity: ${o.icon.opacity};\n rotate: ${o.icon.rotate}deg;\n fill: ${o.icon.color};\n }\n }\n\n #${e}.event-hover .wp-block-navigation__submenu-container .wp-block-navigation-item.has-child:hover .cozy-dropdown-icon, #${e}.event-hover .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container .wp-block-navigation-item.has-child:hover .cozy-dropdown-icon {\n rotate: ${o.icon.rotateActive}deg;\n }\n #${e}.event-hover .wp-block-navigation-item:hover .wp-block-navigation__submenu-container .cozy-dropdown-icon, #${e}.event-hover .wp-block-navigation__submenu-container .wp-block-navigation-item:hover .wp-block-navigation__submenu-container .cozy-dropdown-icon {\n rotate: ${o.icon.rotate}deg;\n }\n\n #${e} .cozy-block-navigation-menu.full-screen {\n padding: ${o.responsive.padding.top}px ${o.responsive.padding.right}px ${o.responsive.padding.bottom}px ${o.responsive.padding.left}px;\n background-color: ${o.responsive.bgColor};\n }\n #${e} .cozy-block-navigation-menu.full-screen .cozy-responsive-icon__close {\n top: ${o.responsive.iconTop}px;\n }\n #${e} .cozy-block-navigation-menu.full-screen.responsive-icon-position-left .cozy-responsive-icon__close {\n left: 0;\n right: auto;\n }\n #${e} .cozy-block-navigation-menu.full-screen.responsive-icon-position-right .cozy-responsive-icon__close {\n right: 0;\n left: auto;\n }\n\n #${e} .wp-block-navigation-item__content {\n font-size: ${o.typography.fontSize}px;\n font-weight: ${o.typography.fontWeight};\n font-family: ${o.typography?.fontFamily};\n text-transform: ${o.typography?.letterCase};\n text-decoration: ${o.typography?.decoration};\n line-height: ${o.typography?.lineHeight};\n letter-spacing: ${o.typography?.letterSpacing};\n color: ${o.typography.color};\n }\n #${e} .wp-block-navigation-item:active .wp-block-navigation-item__content {\n color: ${o.typography.colorActive};\n }\n #${e} .cozy-block-navigation-menu:not(.full-screen) .wp-block-navigation-item:active {\n background-color: ${o.typography.bgColorActive};\n }\n `}const a=window.wp.components,i=window.React,c=window.wp.primitives,r=(0,i.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(c.Path,{d:"M5 11.25h14v1.5H5z"})),d=(0,i.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(c.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),p=(0,i.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(c.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),y=(0,i.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(c.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})),h=(0,i.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(c.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),u=(0,i.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(c.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})),g=window.ReactJSXRuntime,m=()=>(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"16px",marginBottom:"10px"},children:[(0,g.jsx)("p",{children:(0,g.jsxs)("svg",{width:"41",height:"48",viewBox:"0 0 41 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{d:"M0 34.7721L6.88004 38.677V15.8055L20.4542 7.80977L23.9872 9.4833L30.4953 5.57841L20.4542 -7.62939e-06L0 11.9006V34.7721Z",fill:"#38DAC7"}),(0,g.jsx)("path",{d:"M32.9284 6.87939L34.2126 7.61318L12.3825 19.904L12.1991 40.45L20.6376 45.8616L41.0001 33.6625V35.4969L20.6376 47.6043L10.8232 41.2755V18.9868L32.9284 6.87939Z",fill:"#5566CA"}),(0,g.jsx)("path",{d:"M37.6063 9.53936L36.2305 8.71385L14.217 21.3716V38.9824L20.5459 43.5685L41.0001 31.3694V29.5349L20.5459 41.8258L15.5928 38.2486V22.1054L37.6063 9.53936Z",fill:"#5566CA"}),(0,g.jsx)("path",{d:"M41.0001 11.3738L39.5325 10.5483L17.3356 23.2061V37.2397L20.5459 39.6244L41.0001 27.4253V25.6826L20.5459 37.79L18.9866 36.5976V24.1233L41.0001 11.3738Z",fill:"#5566CA"})]})}),(0,g.jsx)("h2",{style:{fontSize:"18px",fontFamily:"Inter",marginTop:"-5px",marginBottom:"15px"},children:(0,o.__)("Access Without Limits!","cozy-addons")}),(0,g.jsx)("p",{style:{textAlign:"center",lineHeight:"20px"},children:(0,o.__)("Access more blocks and advanced features for effortless design. Upgrade today for a richer web-building experience!","cozy-addons")}),(0,g.jsx)("a",{href:"https://cozythemes.com/pricing-and-plans/",target:"_blank",children:(0,g.jsx)("button",{className:"cozy-block-premium-button",style:{backgroundColor:"#5566ca",borderRadius:"20px",padding:"10px",border:"none",color:"#fff",fontFamily:"Inter",fontSize:"10px",fontWeight:"500",cursor:"pointer"},children:(0,g.jsxs)("div",{style:{display:"flex",gap:"5px",margin:"0"},children:[(0,g.jsx)("div",{children:(0,g.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("path",{d:"M9.29768 0.0630875L0.24397 5.2847C-0.109583 5.48778 -0.0646564 5.97987 0.286944 6.12828L2.36334 6.99919L7.97527 2.05487C8.0827 1.95919 8.23506 2.10565 8.14325 2.21695L3.43767 7.94822V9.52017C3.43767 9.98102 3.99437 10.1626 4.26784 9.8287L5.50821 8.31924L7.94206 9.33857C8.21943 9.45573 8.53588 9.28194 8.58666 8.98317L9.99306 0.547365C10.0595 0.152913 9.6356 -0.132186 9.29768 0.0630875Z",fill:"white"})})}),(0,g.jsx)("div",{children:(0,o.__)("Upgrade to Pro","cozy-addons")})]})})})]})}),v=(0,l.memo)((({attributes:e,setAttributes:s})=>{const[t,i]=(0,l.useState)(""),c=e=>{i(e.target.value)},v=Object.keys(cozyIcons.collection).filter((e=>e.toLowerCase().includes(t.toLowerCase()))),[b,x]=(0,l.useState)(!0),_=(o,n)=>{let l={...e.iconBoxStyles.padding};l={...l,top:Math.abs(n),right:Math.abs(n),bottom:Math.abs(n),left:Math.abs(n)},s(b?{...e,iconBoxStyles:{...e.iconBoxStyles,padding:l}}:{...e,iconBoxStyles:{...e.iconBoxStyles,padding:{...e.iconBoxStyles.padding,[o]:Math.abs(n)}}})},[z,w]=(0,l.useState)(!0),C=(o,n)=>{let l={...e.menuStyles.padding};l={...l,top:Math.abs(n),right:Math.abs(n),bottom:Math.abs(n),left:Math.abs(n)},s(z?{...e,menuStyles:{...e.menuStyles,padding:l}}:{...e,menuStyles:{...e.menuStyles,padding:{...e.menuStyles.padding,[o]:Math.abs(n)}}})},[S,j]=(0,l.useState)(!0),f=(o,n)=>{let l={...e.menuStyles.itemPadding};l={...l,top:Math.abs(n),right:Math.abs(n),bottom:Math.abs(n),left:Math.abs(n)},s(S?{...e,menuStyles:{...e.menuStyles,itemPadding:l}}:{...e,menuStyles:{...e.menuStyles,itemPadding:{...e.menuStyles.itemPadding,[o]:Math.abs(n)}}})},[B,k]=(0,l.useState)(!0),I=(o,n)=>{let l={...e.submenuStyles.padding};l={...l,top:Math.abs(n),right:Math.abs(n),bottom:Math.abs(n),left:Math.abs(n)},s(B?{...e,submenuStyles:{...e.submenuStyles,padding:l}}:{...e,submenuStyles:{...e.submenuStyles,padding:{...e.submenuStyles.padding,[o]:Math.abs(n)}}})},[$,M]=(0,l.useState)(!0),L=(o,n)=>{let l={...e.responsive.padding};l={...l,top:Math.abs(n),right:Math.abs(n),bottom:Math.abs(n),left:Math.abs(n)},s($?{...e,responsive:{...e.responsive,padding:l}}:{...e,responsive:{...e.responsive,padding:{...e.responsive.padding,[o]:Math.abs(n)}}})},H=function(){let e=[{label:"Default",value:""}];if("object"==typeof cozyBlockAssets.googleFonts)for(let o in cozyBlockAssets.googleFonts)e.push({label:cozyBlockAssets.googleFonts[o],value:o});return e}(),[T,N]=(0,l.useState)("general");return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(n.InspectorControls,{group:"settings",children:[(0,g.jsxs)(a.PanelBody,{title:(0,o.__)("General","cozy-addons"),opened:"general"===T,onToggle:()=>N("general"),children:[(0,g.jsxs)(a.__experimentalToggleGroupControl,{label:(0,o.__)("Menu Display","cozy-addons"),isBlock:!0,value:e.menuDisplay,onChange:o=>s({...e,menuDisplay:o}),children:[(0,g.jsx)(a.__experimentalToggleGroupControlOption,{label:(0,o.__)("Horizontal","cozy-addons"),value:"horizontal"}),(0,g.jsx)(a.__experimentalToggleGroupControlOption,{label:(0,o.__)("Vertical","cozy-addons"),value:"vertical"})]}),"vertical"===e.menuDisplay&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a.TextControl,{label:(0,o.__)("Menu Width","cozy-addons"),min:0,type:"number",value:e.menuWidth,onChange:o=>s({...e,menuWidth:Math.abs(o)})}),(0,g.jsx)(a.TextControl,{label:(0,o.__)("Dropdown Width","cozy-addons"),min:0,type:"number",value:e.dropdownWidth,onChange:o=>s({...e,dropdownWidth:Math.abs(o)})})]}),(0,g.jsxs)(a.__experimentalToggleGroupControl,{label:(0,o.__)("Menu Display Event","cozy-addons"),isBlock:!0,value:e.displayEvent,onChange:o=>s({...e,displayEvent:o}),children:[(0,g.jsx)(a.__experimentalToggleGroupControlOption,{label:(0,o.__)("Hover","cozy-addons"),value:"hover"}),(0,g.jsx)(a.__experimentalToggleGroupControlOption,{label:(0,o.__)("Click","cozy-addons"),value:"click"})]}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Menu Gap","cozy-addons"),min:0,max:100,step:1,value:e.menuGap,onChange:o=>s({...e,menuGap:Math.abs(o)})}),"horizontal"===e.menuDisplay&&(0,g.jsx)(a.TabPanel,{className:"cozy-tab-panel",activeClass:"active-tab",tabs:[{name:"cozy-tab__one",title:(0,o.__)("Mega Menu","cozy-addons")},{name:"cozy-tab__two",title:(0,o.__)("Submenu","cozy-addons")}],children:n=>(0,g.jsxs)(g.Fragment,{children:["cozy-tab__one"===n.name&&(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Dropdown Top Spacing","cozy-addons"),min:0,max:200,step:1,value:e?.megaMenuContentGap,onChange:o=>s({...e,megaMenuContentGap:Math.abs(o)})})}),"cozy-tab__two"===n.name&&(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Dropdown Top Spacing","cozy-addons"),min:0,max:200,step:1,value:e.contentGap,onChange:o=>s({...e,contentGap:Math.abs(o)})})})]})}),(0,g.jsx)(a.ToggleControl,{label:(0,o.__)("Enable Dropdown Icon","cozy-addons"),checked:e.icon.enabled,onChange:o=>s({...e,icon:{...e.icon,enabled:o}})})]}),e.icon.enabled&&(0,g.jsx)(a.PanelBody,{title:(0,o.__)("Dropdown Icon","cozy-addons"),opened:"dropdown-icon"===T,onToggle:()=>N("dropdown-icon"),children:(0,g.jsxs)(a.BaseControl,{children:[(0,g.jsxs)("div",{style:{display:"flex",gap:"150px",alignItems:"center"},children:[(0,g.jsx)(a.BaseControl.VisualLabel,{className:"margin-none",children:(0,o.__)("Select Icon","cozy-addons")}),(0,g.jsx)("svg",{width:16,height:16,viewBox:`${e.icon.viewBox.vx} ${e.icon.viewBox.vy} ${e.icon.viewBox.vw} ${e.icon.viewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,g.jsx)("path",{d:e.icon.path,fill:"black"})})]}),(0,g.jsx)("input",{type:"text",className:"cozy-icon-search",placeholder:(0,o.__)("Search Icons...","cozy-addons"),value:t,onChange:c}),(0,g.jsx)("div",{className:"cozy-icon-list",children:v.map((o=>{const n=cozyIcons.collection[o],l=n.match(/d="([^"]+)"/),t=n.match(/viewBox\s*=\s*"([^"]*)"/),i=l?l[1]:"",c=t?t[1]:"";return(0,g.jsx)(a.Button,{onClick:()=>((o,n)=>{const l=n.split(" ");s({...e,icon:{...e.icon,path:o,viewBox:{vx:l[0],vy:l[1],vw:l[2],vh:l[3]}}})})(i,c),children:(0,g.jsx)("div",{className:"cozy-icon",title:o,dangerouslySetInnerHTML:{__html:n}})},o)}))})]})}),(0,g.jsxs)(a.PanelBody,{title:(0,o.__)("Responsive Menu","cozy-addons"),opened:"responsive-menu"===T,onToggle:()=>N("responsive-menu"),children:[(0,g.jsx)(a.TextControl,{label:(0,o.__)("Responsive Width","cozy-addons"),type:"number",min:400,step:1,value:e.responsive.width,onChange:o=>s({...e,responsive:{...e.responsive,width:Math.abs(o)}})}),(0,g.jsx)(a.TabPanel,{className:"cozy-tab-panel",activeClass:"active-tab",tabs:[{name:"responsive-open-icon",title:"Open Icon",className:"tab-one"},{name:"responsive-close-icon",title:"Close Icon",className:"tab-two"}],children:n=>(0,g.jsxs)(g.Fragment,{children:["responsive-open-icon"===n.name&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(a.BaseControl,{children:[(0,g.jsxs)("div",{style:{display:"flex",gap:"150px",alignItems:"center"},children:[(0,g.jsx)(a.BaseControl.VisualLabel,{className:"margin-none",children:(0,o.__)("Select Icon","cozy-addons")}),(0,g.jsx)("svg",{width:16,height:16,viewBox:`${e.responsive.openIcon.viewBox.vx} ${e.responsive.openIcon.viewBox.vy} ${e.responsive.openIcon.viewBox.vw} ${e.responsive.openIcon.viewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,g.jsx)("path",{d:e.responsive.openIcon.path,fill:"black"})})]}),(0,g.jsx)("input",{type:"text",className:"cozy-icon-search",placeholder:(0,o.__)("Search Icons...","cozy-addons"),value:t,onChange:c}),(0,g.jsx)("div",{className:"cozy-icon-list",children:v.map((o=>{const n=cozyIcons.collection[o],l=n.match(/d="([^"]+)"/),t=n.match(/viewBox\s*=\s*"([^"]*)"/),i=l?l[1]:"",c=t?t[1]:"";return(0,g.jsx)(a.Button,{onClick:()=>((o,n)=>{const l=n.split(" ");s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,path:o,viewBox:{vx:l[0],vy:l[1],vw:l[2],vh:l[3]}}}})})(i,c),children:(0,g.jsx)("div",{className:"cozy-icon",title:o,dangerouslySetInnerHTML:{__html:n}})},o)}))})]})}),"responsive-close-icon"===n.name&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(a.BaseControl,{children:[(0,g.jsxs)("div",{style:{display:"flex",gap:"150px",alignItems:"center"},children:[(0,g.jsx)(a.BaseControl.VisualLabel,{className:"margin-none",children:(0,o.__)("Select Icon","cozy-addons")}),(0,g.jsx)("svg",{width:16,height:16,viewBox:`${e.responsive.closeIcon.viewBox.vx} ${e.responsive.closeIcon.viewBox.vy} ${e.responsive.closeIcon.viewBox.vw} ${e.responsive.closeIcon.viewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,g.jsx)("path",{d:e.responsive.closeIcon.path,fill:"black"})})]}),(0,g.jsx)("input",{type:"text",className:"cozy-icon-search",placeholder:(0,o.__)("Search Icons...","cozy-addons"),value:t,onChange:c}),(0,g.jsx)("div",{className:"cozy-icon-list",children:v.map((o=>{const n=cozyIcons.collection[o],l=n.match(/d="([^"]+)"/),t=n.match(/viewBox\s*=\s*"([^"]*)"/),i=l?l[1]:"",c=t?t[1]:"";return(0,g.jsx)(a.Button,{onClick:()=>((o,n)=>{const l=n.split(" ");s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,path:o,viewBox:{vx:l[0],vy:l[1],vw:l[2],vh:l[3]}}}})})(i,c),children:(0,g.jsx)("div",{className:"cozy-icon",title:o,dangerouslySetInnerHTML:{__html:n}})},o)}))})]})})]})})]}),!cozyBlockAssets.isPremium&&(0,g.jsx)(m,{})]},"setting"),(0,g.jsxs)(n.InspectorControls,{group:"styles",children:[(0,g.jsxs)(a.PanelBody,{title:(0,o.__)("Wrapper Styles","cozy-addons"),opened:"wrapper-styles"===T,onToggle:()=>N("wrapper-styles"),children:[(0,g.jsxs)("fieldset",{className:"cozy-block__fieldset",children:[(0,g.jsx)("legend",{children:(0,o.__)("Container","cozy-addons")}),(0,g.jsxs)(a.BaseControl,{children:[(0,g.jsx)(a.BaseControl.VisualLabel,{children:(0,o.__)("Padding","cozy-addons")}),(0,g.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,g.jsx)("button",{className:"cozy-link-styles "+(z?"":"cozy-attr-link-disabled"),onClick:()=>w(!z),children:(0,g.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Top","cozy-addons"),value:e.menuStyles.padding.top,onChange:e=>C("top",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Right","cozy-addons"),value:e.menuStyles.padding.right,onChange:e=>C("right",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Bottom","cozy-addons"),value:e.menuStyles.padding.bottom,onChange:e=>C("bottom",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Left","cozy-addons"),value:e.menuStyles.padding.left,onChange:e=>C("left",e)})]})]}),(0,g.jsx)(a.SelectControl,{label:(0,o.__)("Border Type","cozy-addons"),value:e.menuStyles.borderType,options:[{label:(0,o.__)("None","cozy-addons"),value:"none"},{label:(0,o.__)("Solid","cozy-addons"),value:"solid"},{label:(0,o.__)("Double","cozy-addons"),value:"double"},{label:(0,o.__)("Dotted","cozy-addons"),value:"dotted"},{label:(0,o.__)("Dashed","cozy-addons"),value:"dashed"},{label:(0,o.__)("Groove","cozy-addons"),value:"groove"}],onChange:o=>s({...e,menuStyles:{...e.menuStyles,borderType:o}})}),"none"!==e.menuStyles.borderType&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Border Width","cozy-addons"),min:1,max:50,step:1,value:e.menuStyles.borderWidth,onChange:o=>s({...e,menuStyles:{...e.menuStyles,borderWidth:Math.abs(o)}})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Border Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Default","cozy-addons"),value:e.menuStyles.borderColor,onChange:o=>s({...e,menuStyles:{...e.menuStyles,borderColor:o}})}]})]}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Border Radius","cozy-addons"),min:0,max:100,step:1,value:e.menuStyles.borderRadius,onChange:o=>s({...e,menuStyles:{...e.menuStyles,borderRadius:Math.abs(o)}})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Background","cozy-addons"),value:e.menuStyles.bgColor,onChange:o=>s({...e,menuStyles:{...e.menuStyles,bgColor:o}})}]})]}),(0,g.jsxs)("fieldset",{className:"cozy-block__fieldset",children:[(0,g.jsx)("legend",{children:(0,o.__)("Menu","cozy-addons")}),(0,g.jsxs)(a.BaseControl,{children:[(0,g.jsx)(a.BaseControl.VisualLabel,{children:(0,o.__)("Padding","cozy-addons")}),(0,g.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,g.jsx)("button",{className:"cozy-link-styles "+(S?"":"cozy-attr-link-disabled"),onClick:()=>j(!S),children:(0,g.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Top","cozy-addons"),value:e.menuStyles.itemPadding.top,onChange:e=>f("top",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Right","cozy-addons"),value:e.menuStyles.itemPadding.right,onChange:e=>f("right",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Bottom","cozy-addons"),value:e.menuStyles.itemPadding.bottom,onChange:e=>f("bottom",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Left","cozy-addons"),value:e.menuStyles.itemPadding.left,onChange:e=>f("left",e)})]})]}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Border Radius (Menu Item)","cozy-addons"),min:0,max:100,step:1,value:e.menuStyles.itemBorderRadius,onChange:o=>s({...e,menuStyles:{...e.menuStyles,itemBorderRadius:Math.abs(o)}})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Navigation Item (Hover)","cozy-addons"),value:e.menuStyles.itemHoverColor,onChange:o=>s({...e,menuStyles:{...e.menuStyles,itemHoverColor:o}})},{label:(0,o.__)("Text (Hover)","cozy-addons"),value:e.menuStyles.textHoverColor,onChange:o=>s({...e,menuStyles:{...e.menuStyles,textHoverColor:o}})}]})]})]}),(0,g.jsxs)(a.PanelBody,{title:(0,o.__)("Submenu Styles","cozy-addons"),opened:"submenu-styles"===T,onToggle:()=>N("submenu-styles"),children:[(0,g.jsxs)(a.BaseControl,{children:[(0,g.jsx)(a.BaseControl.VisualLabel,{children:(0,o.__)("Padding","cozy-addons")}),(0,g.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,g.jsx)("button",{className:"cozy-link-styles "+(B?"":"cozy-attr-link-disabled"),onClick:()=>k(!B),children:(0,g.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Top","cozy-addons"),value:e.submenuStyles.padding.top,onChange:e=>I("top",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Right","cozy-addons"),value:e.submenuStyles.padding.right,onChange:e=>I("right",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Bottom","cozy-addons"),value:e.submenuStyles.padding.bottom,onChange:e=>I("bottom",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Left","cozy-addons"),value:e.submenuStyles.padding.left,onChange:e=>I("left",e)})]})]}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Min Width","cozy-addons"),min:0,max:500,step:1,value:e.submenuStyles.minWidth,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,minWidth:Math.abs(o)}})}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Item Spacing","cozy-addons"),min:0,max:100,step:1,value:e.submenuStyles.itemSpacing,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,itemSpacing:Math.abs(o)}})}),(0,g.jsx)(a.ToggleControl,{label:(0,o.__)("Box Shadow","cozy-addons"),checked:e.submenuStyles.boxShadow.enabled,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,boxShadow:{...e.submenuStyles.boxShadow,enabled:o}}})}),e.submenuStyles.boxShadow.enabled&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Horizontal","cozy-addons"),min:-100,max:100,step:1,value:e.submenuStyles.boxShadow.horizontal,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,boxShadow:{...e.submenuStyles.boxShadow,horizontal:o}}})}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Horizontal","cozy-addons"),min:-100,max:100,step:1,value:e.submenuStyles.boxShadow.vertical,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,boxShadow:{...e.submenuStyles.boxShadow,vertical:o}}})}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Blur","cozy-addons"),min:0,max:100,step:1,value:e.submenuStyles.boxShadow.blur,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,boxShadow:{...e.submenuStyles.boxShadow,blur:Math.abs(o)}}})}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Spread","cozy-addons"),min:-100,max:100,step:1,value:e.submenuStyles.boxShadow.spread,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,boxShadow:{...e.submenuStyles.boxShadow,spread:o}}})}),(0,g.jsx)(a.SelectControl,{label:(0,o.__)("Position","cozy-addons"),options:[{label:(0,o.__)("Inset","cozy-addons"),value:"inset"},{label:(0,o.__)("Outline","cozy-addons"),value:""}],value:e.submenuStyles.boxShadow.position,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,boxShadow:{...e.submenuStyles.boxShadow,position:o}}})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Shadow Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Default","cozy-addons"),value:e.submenuStyles.boxShadow.color,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,boxShadow:{...e.submenuStyles.boxShadow,color:o}}})}]})]}),(0,g.jsx)(a.SelectControl,{label:(0,o.__)("Border Type","cozy-addons"),value:e.submenuStyles.borderType,options:[{label:(0,o.__)("None","cozy-addons"),value:"none"},{label:(0,o.__)("Solid","cozy-addons"),value:"solid"},{label:(0,o.__)("Double","cozy-addons"),value:"double"},{label:(0,o.__)("Dotted","cozy-addons"),value:"dotted"},{label:(0,o.__)("Dashed","cozy-addons"),value:"dashed"},{label:(0,o.__)("Groove","cozy-addons"),value:"groove"}],onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,borderType:o}})}),"none"!==e.submenuStyles.borderType&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Border Width","cozy-addons"),min:1,max:50,step:1,value:e.submenuStyles.borderWidth,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,borderWidth:Math.abs(o)}})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Border Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Default","cozy-addons"),value:e.submenuStyles.borderColor,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,borderColor:o}})}]})]}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Border Radius","cozy-addons"),min:0,max:100,step:1,value:e.submenuStyles.borderRadius,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,borderRadius:Math.abs(o)}})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Background","cozy-addons"),value:e.submenuStyles.bgColor,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,bgColor:o}})},{label:(0,o.__)("Navigation Item (Hover)","cozy-addons"),value:e.submenuStyles.itemHoverColor,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,itemHoverColor:o}})},{label:(0,o.__)("Text (Hover)","cozy-addons"),value:e.submenuStyles.textHoverColor,onChange:o=>s({...e,submenuStyles:{...e.submenuStyles,textHoverColor:o}})}]})]}),e.icon.enabled&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(a.PanelBody,{title:(0,o.__)("Icon Styles"),opened:"icon-styles"===T,onToggle:()=>N("icon-styles"),children:[(0,g.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsx)(a.__experimentalUnitControl,{label:(0,o.__)("Box Width","cozy-addons"),min:10,step:1,max:100,value:e.iconBoxStyles?.width,onChange:o=>s({...e,iconBoxStyles:{...e.iconBoxStyles,width:o}})})}),(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsx)(a.__experimentalUnitControl,{label:(0,o.__)("Box Height","cozy-addons"),min:10,step:1,max:100,value:e.iconBoxStyles?.height,onChange:o=>s({...e,iconBoxStyles:{...e.iconBoxStyles,height:o}})})})]}),(0,g.jsxs)(a.BaseControl,{children:[(0,g.jsx)(a.BaseControl.VisualLabel,{children:(0,o.__)("Padding","cozy-addons")}),(0,g.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,g.jsx)("button",{className:"cozy-link-styles "+(b?"":"cozy-attr-link-disabled"),onClick:()=>x(!b),children:(0,g.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Top","cozy-addons"),value:e.iconBoxStyles.padding.top,onChange:e=>_("top",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Right","cozy-addons"),value:e.iconBoxStyles.padding.right,onChange:e=>_("right",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Bottom","cozy-addons"),value:e.iconBoxStyles.padding.bottom,onChange:e=>_("bottom",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Left","cozy-addons"),value:e.iconBoxStyles.padding.left,onChange:e=>_("left",e)})]})]}),(0,g.jsx)(a.SelectControl,{label:(0,o.__)("Border Type","cozy-addons"),value:e.iconBoxStyles.borderType,options:[{label:(0,o.__)("None","cozy-addons"),value:"none"},{label:(0,o.__)("Solid","cozy-addons"),value:"solid"},{label:(0,o.__)("Double","cozy-addons"),value:"double"},{label:(0,o.__)("Dotted","cozy-addons"),value:"dotted"},{label:(0,o.__)("Dashed","cozy-addons"),value:"dashed"},{label:(0,o.__)("Groove","cozy-addons"),value:"groove"}],onChange:o=>s({...e,iconBoxStyles:{...e.iconBoxStyles,borderType:o}})}),"none"!==e.iconBoxStyles.borderType&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Border Width","cozy-addons"),min:1,max:50,step:1,value:e.iconBoxStyles.borderWidth,onChange:o=>s({...e,iconBoxStyles:{...e.iconBoxStyles,borderWidth:Math.abs(o)}})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Border Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Default","cozy-addons"),value:e.iconBoxStyles.borderColor,onChange:o=>s({...e,iconBoxStyles:{...e.iconBoxStyles,borderColor:o}})}]})]}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Border Radius","cozy-addons"),min:1,max:100,step:1,value:e.iconBoxStyles.borderRadius,onChange:o=>s({...e,iconBoxStyles:{...e.iconBoxStyles,borderRadius:Math.abs(o)}})}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Size","cozy-addons"),min:5,max:50,step:1,value:e.icon.size,onChange:o=>s({...e,icon:{...e.icon,size:Math.abs(o)}})}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Opacity","cozy-addons"),min:0,max:1,step:.1,value:e.icon.opacity,onChange:o=>s({...e,icon:{...e.icon,opacity:Math.abs(o)}})}),(0,g.jsxs)(a.BaseControl,{children:[(0,g.jsx)(a.BaseControl.VisualLabel,{children:(0,o.__)("Rotate","cozy-addons")}),(0,g.jsx)(a.TabPanel,{className:"cozy-tab-panel",activeClass:"active-tab",tabs:[{name:"default-rotate",title:(0,o.__)("Default","cozy-addons"),className:"tab-one"},{name:"active-rotate",title:(0,o.__)("Hover","cozy-addons"),className:"tab-two"}],children:o=>(0,g.jsxs)(g.Fragment,{children:["default-rotate"===o.name&&(0,g.jsx)(a.RangeControl,{min:0,max:360,step:90,value:e.icon.rotate,onChange:o=>s({...e,icon:{...e.icon,rotate:Math.abs(o)}})}),"active-rotate"===o.name&&(0,g.jsx)(a.RangeControl,{min:0,max:360,step:90,value:e.icon.rotateActive,onChange:o=>s({...e,icon:{...e.icon,rotateActive:Math.abs(o)}})})]})})]}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Gap","cozy-addons"),min:0,max:200,step:1,value:e.icon.gap,onChange:o=>s({...e,icon:{...e.icon,gap:Math.abs(o)}})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Icon","cozy-addons"),value:e.icon.color,onChange:o=>s({...e,icon:{...e.icon,color:o}})},{label:(0,o.__)("Background","cozy-addons"),value:e.iconBoxStyles.bgColor,onChange:o=>s({...e,iconBoxStyles:{...e.iconBoxStyles,bgColor:o}})},{label:(0,o.__)("Background (Hover)","cozy-addons"),value:e.iconBoxStyles.bgColorHover,onChange:o=>s({...e,iconBoxStyles:{...e.iconBoxStyles,bgColorHover:o}})},{label:(0,o.__)("Border (Hover)","cozy-addons"),value:e.iconBoxStyles.borderColorHover,onChange:o=>s({...e,iconBoxStyles:{...e.iconBoxStyles,borderColorHover:o}})}]})]})}),(0,g.jsxs)(a.PanelBody,{title:(0,o.__)("Responsive Menu Styles","cozy-addons"),opened:"responsive-menu-styles"===T,onToggle:()=>N("responsive-menu-styles"),children:[(0,g.jsxs)(a.BaseControl,{children:[(0,g.jsx)(a.BaseControl.VisualLabel,{children:(0,o.__)("Padding","cozy-addons")}),(0,g.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,g.jsx)("button",{className:"cozy-link-styles "+($?"":"cozy-attr-link-disabled"),onClick:()=>M(!$),children:(0,g.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,g.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Top","cozy-addons"),value:e.responsive.padding.top,onChange:e=>L("top",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Right","cozy-addons"),value:e.responsive.padding.right,onChange:e=>L("right",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Bottom","cozy-addons"),value:e.responsive.padding.bottom,onChange:e=>L("bottom",e)}),(0,g.jsx)(a.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Left","cozy-addons"),value:e.responsive.padding.left,onChange:e=>L("left",e)})]})]}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Menu Vertical Gap","cozy-addons"),min:0,max:50,step:1,value:e.responsive.gap,onChange:o=>s({...e,responsive:{...e.responsive,gap:Math.abs(o)}})}),(0,g.jsx)(a.TabPanel,{className:"cozy-tab-panel",tabs:[{name:"cozy-tab__one",title:(0,o.__)("Open Icon","cozy-addons"),className:"cozy-tab-one"},{name:"cozy-tab__two",title:(0,o.__)("Close Icon","cozy-addons"),className:"cozy-tab-two"}],activeClass:"active-tab",children:l=>(0,g.jsxs)(g.Fragment,{children:["cozy-tab__one"===l.name&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsx)(a.__experimentalUnitControl,{label:(0,o.__)("Box Width","cozy-addons"),min:10,step:1,max:100,value:e.responsive.openIcon?.boxWidth,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,boxWidth:o}}})})}),(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsx)(a.__experimentalUnitControl,{label:(0,o.__)("Box Height","cozy-addons"),min:10,step:1,max:100,value:e.responsive.openIcon?.boxHeight,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,boxHeight:o}}})})})]}),(0,g.jsx)("div",{className:"components-base-control",children:(0,g.jsx)(a.__experimentalBorderControl,{label:(0,o.__)("Border","cozy-addons"),enableAlpha:!0,isCompact:!0,value:e.responsive.openIcon?.border,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,border:o}}})})}),(0,g.jsx)("div",{className:"components-base-control",children:(0,g.jsx)(n.HeightControl,{label:(0,o.__)("Radius","cozy-addons"),value:e.responsive.openIcon?.radius,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,radius:o}}})})}),(0,g.jsx)("div",{className:"components-base-control",children:(0,g.jsx)(n.HeightControl,{label:(0,o.__)("Icon Size","cozy-addons"),value:e.responsive.openIcon?.size,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,size:o}}})})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Icon","cozy-addons"),value:e.responsive.openIcon?.color?.icon,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,color:{...e.responsive.openIcon.color,icon:o}}}})},{label:(0,o.__)("Icon (Hover)","cozy-addons"),value:e.responsive.openIcon?.color?.iconHover,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,color:{...e.responsive.openIcon.color,iconHover:o}}}})},{label:(0,o.__)("Background","cozy-addons"),value:e.responsive.openIcon?.color?.bg,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,color:{...e.responsive.openIcon.color,bg:o}}}})},{label:(0,o.__)("Background (Hover)","cozy-addons"),value:e.responsive.openIcon?.color?.bgHover,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,color:{...e.responsive.openIcon.color,bgHover:o}}}})},{label:(0,o.__)("Border (Hover)","cozy-addons"),value:e.responsive.openIcon?.color?.borderHover,onChange:o=>s({...e,responsive:{...e.responsive,openIcon:{...e.responsive.openIcon,color:{...e.responsive.openIcon.color,borderHover:o}}}})}]})]}),"cozy-tab__two"===l.name&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a.SelectControl,{label:(0,o.__)("Icon Position","cozy-addons"),options:[{label:(0,o.__)("Left","cozy-addons"),value:"left"},{label:(0,o.__)("Right","cozy-addons"),value:"right"}],value:e.responsive.iconPosition,onChange:o=>s({...e,responsive:{...e.responsive,iconPosition:o}})}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Vertical Spacing","cozy-addons"),min:-300,max:300,step:1,value:e.responsive.iconTop,onChange:o=>s({...e,responsive:{...e.responsive,iconTop:o}})}),(0,g.jsx)(a.RangeControl,{label:(0,o.__)("Horizontal Spacing","cozy-addons"),min:-300,max:300,step:1,value:e.responsive.closeIcon?.horizontalSpacing,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,horizontalSpacing:o}}})}),(0,g.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsx)(a.__experimentalUnitControl,{label:(0,o.__)("Box Width","cozy-addons"),min:10,step:1,max:100,value:e.responsive.closeIcon?.boxWidth,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,boxWidth:o}}})})}),(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsx)(a.__experimentalUnitControl,{label:(0,o.__)("Box Height","cozy-addons"),min:10,step:1,max:100,value:e.responsive.closeIcon?.boxHeight,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,boxHeight:o}}})})})]}),(0,g.jsx)("div",{className:"components-base-control",children:(0,g.jsx)(a.__experimentalBorderControl,{label:(0,o.__)("Border","cozy-addons"),enableAlpha:!0,isCompact:!0,value:e.responsive.closeIcon?.border,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,border:o}}})})}),(0,g.jsx)("div",{className:"components-base-control",children:(0,g.jsx)(n.HeightControl,{label:(0,o.__)("Radius","cozy-addons"),value:e.responsive.closeIcon?.radius,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,radius:o}}})})}),(0,g.jsx)("div",{className:"components-base-control",children:(0,g.jsx)(n.HeightControl,{label:(0,o.__)("Icon Size","cozy-addons"),value:e.responsive.closeIcon?.size,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,size:o}}})})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Icon","cozy-addons"),value:e.responsive.closeIcon?.color?.icon,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,color:{...e.responsive.closeIcon.color,icon:o}}}})},{label:(0,o.__)("Icon (Hover)","cozy-addons"),value:e.responsive.closeIcon?.color?.iconHover,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,color:{...e.responsive.closeIcon.color,iconHover:o}}}})},{label:(0,o.__)("Background","cozy-addons"),value:e.responsive.closeIcon?.color?.bg,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,color:{...e.responsive.closeIcon.color,bg:o}}}})},{label:(0,o.__)("Background (Hover)","cozy-addons"),value:e.responsive.closeIcon?.color?.bgHover,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,color:{...e.responsive.closeIcon.color,bgHover:o}}}})},{label:(0,o.__)("Border (Hover)","cozy-addons"),value:e.responsive.closeIcon?.color?.borderHover,onChange:o=>s({...e,responsive:{...e.responsive,closeIcon:{...e.responsive.closeIcon,color:{...e.responsive.closeIcon.color,borderHover:o}}}})}]})]})]})}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Overlay","cozy-addons"),value:e.responsive.bgColor,onChange:o=>s({...e,responsive:{...e.responsive,bgColor:o}})}]})]}),(0,g.jsxs)(a.PanelBody,{title:(0,o.__)("Typography","cozy-addons"),opened:"typography"===T,onToggle:()=>N("typography"),children:[(0,g.jsx)(a.TextControl,{label:(0,o.__)("Font Size","cozy-addons"),type:"number",min:10,value:e.typography.fontSize,onChange:o=>s({...e,typography:{...e.typography,fontSize:Math.abs(o)}})}),(0,g.jsx)(a.SelectControl,{label:(0,o.__)("Font Family","cozy-addons"),options:H,value:e.typography.fontFamily,onChange:o=>s({...e,typography:{...e.typography,fontFamily:o}})}),(0,g.jsx)(a.SelectControl,{label:(0,o.__)("Font Weight","cozy-addons"),options:[{label:(0,o.__)("Thin","cozy-addons"),value:100},{label:(0,o.__)("Extra Light","cozy-addons"),value:200},{label:(0,o.__)("Light","cozy-addons"),value:300},{label:(0,o.__)("Normal","cozy-addons"),value:400},{label:(0,o.__)("Medium","cozy-addons"),value:500},{label:(0,o.__)("Semi Bold","cozy-addons"),value:600},{label:(0,o.__)("Bold","cozy-addons"),value:700},{label:(0,o.__)("Extra Bold","cozy-addons"),value:800}],value:e.typography.fontWeight,onChange:o=>s({...e,typography:{...e.typography,fontWeight:o}})}),(0,g.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsxs)(a.__experimentalToggleGroupControl,{label:(0,o.__)("Letter Case","cozy-addons"),value:e.typography?.letterCase,onChange:o=>s({...e,typography:{...e.typography,letterCase:o}}),children:[(0,g.jsx)(a.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("None","cozy-addons"),value:"none",icon:r}),(0,g.jsx)(a.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("Uppercase","cozy-addons"),value:"uppercase",icon:d}),(0,g.jsx)(a.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("Lowercase","cozy-addons"),value:"lowercase",icon:p}),(0,g.jsx)(a.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("Capitalize","cozy-addons"),value:"capitalize",icon:y})]})}),(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsxs)(a.__experimentalToggleGroupControl,{label:(0,o.__)("Decoration","cozy-addons"),value:e.typography?.decoration,onChange:o=>s({...e,typography:{...e.typography,decoration:o}}),children:[(0,g.jsx)(a.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("None","cozy-addons"),value:"none",icon:r}),(0,g.jsx)(a.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("Underline","cozy-addons"),value:"underline",icon:h}),(0,g.jsx)(a.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("Strikethrough","cozy-addons"),value:"line-through",icon:u})]})})]}),(0,g.jsxs)("div",{className:"components-base-control",style:{display:"flex",justifyContent:"space-between",gap:"10px"},children:[(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsx)(a.__experimentalUnitControl,{label:(0,o.__)("Line Height","cozy-addons"),value:e.typography?.lineHeight,onChange:o=>s({...e,typography:{...e.typography,lineHeight:o}})})}),(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsx)(a.__experimentalUnitControl,{label:(0,o.__)("Letter Spacing","cozy-addons"),value:e.typography?.letterSpacing,onChange:o=>s({...e,typography:{...e.typography,letterSpacing:o}})})})]}),(0,g.jsx)(n.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Text (Default)","cozy-addons"),value:e.typography.color,onChange:o=>s({...e,typography:{...e.typography,color:o}})},{label:(0,o.__)("Text (Active)","cozy-addons"),value:e.typography.colorActive,onChange:o=>s({...e,typography:{...e.typography,colorActive:o}})},{label:(0,o.__)("Background (Active)","cozy-addons"),value:e.typography.bgColorActive,onChange:o=>s({...e,typography:{...e.typography,bgColorActive:o}})}]})]})]},"style")]})})),b=(0,l.memo)((()=>{const e=(0,n.useInnerBlocksProps)({className:"cozy-nav-submenu wp-block-navigation-item cozy-menu-wrapper"},{allowedBlocks:["core/home-link","core/navigation-link","core/navigation-submenu"],template:[["core/home-link"],["core/navigation-link",{namespace:"cozy-block/cozy-nav-link"}]]});return(0,g.jsx)("li",{...e})})),x=(0,l.memo)((({blockId:e,attributes:o,clientId:n})=>{const l=(0,s.useRefEffect)((e=>{function n(e){if(o.icon.enabled){const s=e.querySelector(".wp-block-navigation-item__content");var n=document.createElement("div");n.className="cozy-dropdown-icon-wrapper",n.innerHTML=`\n\t\t <svg\n\t\t\tclass="cozy-dropdown-icon"\n\t\t\twidth="${o.icon.size}"\n\t\t\theight="${o.icon.size}"\n\t\t\t${"fill"===o.icon.layout?"stroke='none' fill='"+o.icon.color+"'":""}\n\t\t\t${"outline"===o.icon.layout?"fill='none' stroke='"+o.icon.color+"'":""}\n\t\t\tviewBox="${o.icon.viewBox.vx} ${o.icon.viewBox.vy} ${o.icon.viewBox.vw} ${o.icon.viewBox.vh}"\n\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\taria-hidden="true"\n\t\t >\n\t\t\t<path d="${o.icon.path}"/>\n\t\t </svg>\n\t\t`,e.querySelector(".cozy-dropdown-icon-wrapper")||s.parentNode.insertBefore(n,s.nextSibling)}}e.querySelectorAll(".wp-block-navigation-submenu").forEach((e=>{n(e)})),e.querySelectorAll(".wp-block-navigation-item.cozy-mega-menu__item").forEach((e=>{o.icon.enabled&&n(e)}))}),[o]);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("style",{dangerouslySetInnerHTML:{__html:t(e,o)}}),""!=o.typography?.fontFamily&&null!=o.typography?.fontFamily&&(0,g.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${o.typography?.fontFamily}:wght@100;200;300;400;500;600;700;800;900`}),(0,g.jsx)("div",{className:`cozy-block-mega-menu display-${o.menuDisplay} event-${o.displayEvent} ${o.submenuStyles.boxShadow.enabled?"submenu-has-box-shadow":""} icon-view-${o.icon.view} responsive-menu-slide-${o.responsive.slide}`,id:e,ref:l,children:(0,g.jsx)("nav",{className:"cozy-block-navigation-menu",children:(0,g.jsx)("ul",{className:"cozy-menu-wrapper",children:(0,g.jsx)(b,{})})})})]})})),_=JSON.parse('{"UU":"cozy-block/mega-menu","DD":"Advanced Mega Menu","h_":"Our user-friendly \'Advanced Mega Menu Block\' is the ultimate solution for effortlessly organizing your site\'s content into stylish and efficient multi-column layouts, enhancing navigation for your visitors."}'),z=(0,g.jsxs)("svg",{width:"27",height:"22",viewBox:"0 0 27 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("rect",{fill:"none",x:"1",y:"1",width:"25",height:"20",stroke:"#0C50FF",strokeWidth:"2"}),(0,g.jsx)("rect",{fill:"none",x:"5",y:"5",width:"17",height:"4.47368",stroke:"#0C50FF"}),(0,g.jsx)("path",{d:"M19.3474 7.93656L18.4599 7.11199C18.3985 7.05499 18.3985 6.96283 18.4599 6.90645L18.6074 6.76942C18.6687 6.71243 18.7679 6.71243 18.8286 6.76942L19.4577 7.3539L20.0869 6.76942C20.1482 6.71243 20.2474 6.71243 20.3081 6.76942L20.4556 6.90645C20.5169 6.96344 20.5169 7.0556 20.4556 7.11199L19.568 7.93656C19.508 7.99356 19.4088 7.99356 19.3474 7.93656Z",fill:"#0C50FF"}),(0,g.jsx)("path",{fill:"none",d:"M7.23685 17.5263V9.47369H22V17.5263H14.8421H7.23685Z",stroke:"#0C50FF"}),(0,g.jsx)("path",{d:"M9.47369 11.2631H14.3947V15.7368H9.47369V11.2631Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{d:"M6.78946 6.78949H13.0526V7.68423H6.78946V6.78949Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{d:"M15.2895 11.2631H19.7631V12.1579H15.2895V11.2631Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{d:"M15.2895 13.0526H19.7631V13.9473H15.2895V13.0526Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{d:"M15.2895 14.8422H19.7631V15.7369H15.2895V14.8422Z",fill:"#0C50FF",fillOpacity:"0.5"})]}),{createHigherOrderComponent:w}=wp.compose,{InspectorControls:C}=wp.blockEditor,{PanelBody:S,ToggleControl:j,SelectControl:f,BaseControl:B,RangeControl:k}=wp.components,{useSelect:I,select:$}=wp.data;(0,e.registerBlockType)(_.UU,{title:(0,o.__)(_.DD,"cozy-addons"),description:(0,o.__)(_.h_,"cozy-addons"),icon:{src:z},edit:function({attributes:e,setAttributes:o,clientId:s}){if(e.cover)return(0,g.jsx)("img",{src:e.cover});e.blockClientId=s;const l=(0,n.useBlockProps)({className:"cozy-block-wrapper cozy-block-mega-menu-wrapper"}),t=`cozyBlock_${s.replace(/-/gi,"_")}`;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{...l,children:(0,g.jsx)(x,{blockId:t,attributes:e,clientId:s})}),(0,g.jsx)(v,{attributes:e,setAttributes:o})]})},save:function({attributes:e}){const o=`cozyBlock_${(s=e.blockClientId,s.replace(/[;=()\s]/g,"")).replace(/-/gi,"_")}`;var s;return e.blockClientId,(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:`cozy-block-mega-menu display-${e.menuDisplay} event-${e.displayEvent} ${e.submenuStyles.boxShadow.enabled?"submenu-has-box-shadow":""} icon-view-${e.icon.view} responsive-menu-slide-${e.responsive.slide}`,id:o,children:[(0,g.jsxs)("div",{className:"cozy-responsive-icon__wrapper open-icon-wrapper display-none cozy-dropdown-icon-wrapper",children:["fill"===e.icon.layout&&(0,g.jsx)("svg",{className:"cozy-responsive-icon cozy-responsive-icon__open",width:e.icon.size,height:e.icon.size,viewBox:`${e.responsive.openIcon.viewBox.vx} ${e.responsive.openIcon.viewBox.vy} ${e.responsive.openIcon.viewBox.vw} ${e.responsive.openIcon.viewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",fill:e.icon.color,stroke:"none",children:(0,g.jsx)("path",{d:e.responsive.openIcon.path})}),"outline"===e.icon.layout&&(0,g.jsx)("svg",{className:"cozy-responsive-icon cozy-responsive-icon__open",width:e.icon.size,height:e.icon.size,viewBox:`${e.responsive.openIcon.viewBox.vx} ${e.responsive.openIcon.viewBox.vy} ${e.responsive.openIcon.viewBox.vw} ${e.responsive.openIcon.viewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",stroke:e.icon.color,fill:"none",children:(0,g.jsx)("path",{d:e.responsive.openIcon.path})})]}),(0,g.jsxs)("nav",{className:`cozy-block-navigation-menu display-none responsive-icon-position-${e.responsive.iconPosition}`,children:[(0,g.jsxs)("div",{className:"cozy-responsive-icon__wrapper close-icon-wrapper display-none",children:["fill"===e.icon.layout&&(0,g.jsx)("svg",{className:"cozy-responsive-icon cozy-responsive-icon__close",width:e.icon.size,height:e.icon.size,viewBox:`${e.responsive.closeIcon.viewBox.vx} ${e.responsive.closeIcon.viewBox.vy} ${e.responsive.closeIcon.viewBox.vw} ${e.responsive.closeIcon.viewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",fill:e.icon.color,stroke:"none",children:(0,g.jsx)("path",{d:e.responsive.closeIcon.path})}),"outline"===e.icon.layout&&(0,g.jsx)("svg",{className:"cozy-responsive-icon cozy-responsive-icon__close",width:e.icon.size,height:e.icon.size,viewBox:`${e.responsive.closeIcon.viewBox.vx} ${e.responsive.closeIcon.viewBox.vy} ${e.responsive.closeIcon.viewBox.vw} ${e.responsive.closeIcon.viewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",stroke:e.icon.color,fill:"none",children:(0,g.jsx)("path",{d:e.responsive.closeIcon.path})})]}),(0,g.jsx)("ul",{className:"cozy-menu-wrapper",children:(0,g.jsx)(n.InnerBlocks.Content,{})})]})]})})}});const M="cozy-block/cozy-nav-link";(0,e.registerBlockVariation)("core/navigation-link",{name:M,title:"Cozy Custom Link",description:(0,o.__)("Cozy Blocks Navigation Link Variation.","cozy-addons"),category:"cozy-block",attributes:{namespace:M,parent:["cozy-block/mega-menu"]},scope:["block"]}),wp.hooks.addFilter("blocks.registerBlockType","custom-attributes/cozy-mega-menu-attr",((e,o)=>"core/navigation-link"!==o?e:Object.assign({},e,{attributes:Object.assign({},e.attributes,{cozyMegaMenu:{type:"object",default:{enabled:!1,labelType:"default",label:"Mega Menu",template:"",width:"default",contentWidth:1180}}})})));const L=w((e=>{const n=function(e){const o=[{label:"--Select Template--",value:"",disabled:!0}];return e.map((e=>o.push({label:e.post_title,value:e.ID}))),o}(cozyMegaMenu.templates);return s=>{if("core/navigation-link"!==s.name&&!s.attributes.cozyMegaMenu)return(0,g.jsx)(e,{...s});const{attributes:l,setAttributes:t,isSelected:a,clientId:i}=s,{cozyMegaMenu:c}=l,r=$("core/block-editor").getBlockRootClientId(i),d=I((e=>e("core/block-editor").getBlockAttributes(r)),[r]);return(0,g.jsxs)(g.Fragment,{children:[a&&"cozy-block/mega-menu"===d?.namespace&&(0,g.jsx)(C,{group:"settings",children:(0,g.jsxs)(S,{title:(0,o.__)("Mega Menu","cozy-addons"),className:"cozy-block-mega-menu__options",children:[!cozyBlockAssets.isPremium&&(0,g.jsxs)(B,{children:[(0,g.jsxs)("div",{style:{display:"flex",gap:"15px"},children:[(0,g.jsx)(B.VisualLabel,{children:(0,o.__)("Enable Mega Menu","cozy-addons")}),(0,g.jsx)("p",{className:"cozy-block-pro-label",children:(0,o.__)("PRO","cozy-addons")})]}),(0,g.jsx)(j,{checked:c.enabled,onChange:e=>t({...l,cozyMegaMenu:{...c,enabled:!1}}),disabled:!0})]}),cozyBlockAssets.isPremium&&(0,g.jsx)(j,{label:(0,o.__)("Enable Mega Menu","cozy-addons"),checked:c.enabled,onChange:e=>t({...l,cozyMegaMenu:{...c,enabled:e}})}),c.enabled&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(f,{label:(0,o.__)("Choose Template","cozy-addons"),options:n,value:c?.template,onChange:e=>t({...l,cozyMegaMenu:{...c,template:e}}),help:(0,o.__)("*Note: If no options appear, consider creating a 'Mega Menu template' from the admin panel.","cozy-addons")}),c.template.length>0&&"horizontal"===d.menuDisplay&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(f,{label:(0,o.__)("Content Width","cozy-addons"),options:[{label:(0,o.__)("Default","cozy-addons"),value:"default"},{label:(0,o.__)("Full Width","cozy-addons"),value:"full"}],value:c.width,onChange:e=>t({...l,cozyMegaMenu:{...c,width:e}})}),"default"===c.width&&(0,g.jsx)(k,{label:(0,o.__)("Content Width (px)","cozy-addons"),min:1180,max:1460,step:1,value:c?.contentWidth,onChange:e=>t({...l,cozyMegaMenu:{...c,contentWidth:e}})})]})]})]})},"setting"),(0,g.jsx)(e,{...s})]})}}),"withCozyMegaMenu");wp.hooks.addFilter("editor.BlockEdit","custom-attributes/cozy-mega-menu-attrs",L),wp.hooks.addFilter("blocks.getSaveElement","custom-attributes/render-cozy-mega-menu",(function(e,o,n){if(!e)return;if("core/navigation-link"!==o.name)return e;const{cozyMegaMenu:s}=n;if(s.enabled){const e="default"===s.width?" has-custom-width-"+s.contentWidth:" has-custom-width-1180";n.className="cozy-mega-menu__item template-id-"+s.template+" "+s.width+"-width"+("default"===s.width?e:"")}else n.className="";return e}))}},n={};function s(e){var l=n[e];if(void 0!==l)return l.exports;var t=n[e]={exports:{}};return o[e](t,t.exports,s),t.exports}s.m=o,e=[],s.O=(o,n,l,t)=>{if(!n){var a=1/0;for(d=0;d<e.length;d++){for(var[n,l,t]=e[d],i=!0,c=0;c<n.length;c++)(!1&t||a>=t)&&Object.keys(s.O).every((e=>s.O[e](n[c])))?n.splice(c--,1):(i=!1,t<a&&(a=t));if(i){e.splice(d--,1);var r=l();void 0!==r&&(o=r)}}return o}t=t||0;for(var d=e.length;d>0&&e[d-1][2]>t;d--)e[d]=e[d-1];e[d]=[n,l,t]},s.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={57:0,350:0};s.O.j=o=>0===e[o];var o=(o,n)=>{var l,t,[a,i,c]=n,r=0;if(a.some((o=>0!==e[o]))){for(l in i)s.o(i,l)&&(s.m[l]=i[l]);if(c)var d=c(s)}for(o&&o(n);r<a.length;r++)t=a[r],s.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return s.O(d)},n=globalThis.webpackChunkmega_menu=globalThis.webpackChunkmega_menu||[];n.forEach(o.bind(null,0)),n.push=o.bind(null,n.push.bind(n))})();var l=s.O(void 0,[350],(()=>s(558)));l=s.O(l)})();
Save
Back