import{p as e,H as a,h as s,e as l,t}from"./p-BHHBMN0G.js";import{d as c}from"./p-Dq2r_Sid.js";import{d as m}from"./p-C1DHlsEo.js";import{d as i}from"./p-Bmv0DoO8.js";import{d as n}from"./p-CvotSt5y.js";const u=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.oneLevelOnly=!1,this.external=!1,this.seeAll=!1,this.hasFeatured=!1,this.hasChildren=!1}componentWillLoad(){var e;this.theme=null!==(e=document.documentElement.getAttribute("data-ecl-theme"))&&void 0!==e?e:this.theme||"ec"}getClass(){return["ecl-mega-menu__subitem","sc-ecl-mega-menu-"+this.theme,this.styleClass].join(" ")}render(){return s(l,{key:"6322d9a7d4fbee7cb4b055b12d0bbdfedd43d45f",class:this.getClass(),"data-ecl-mega-menu-subitem":!0},this.hasChildren?s("ecl-button",{type:"button","style-class":"ecl-mega-menu__sublink sc-ecl-mega-menu-"+this.theme,"data-ecl-mega-menu-sublink":!0,"aria-expanded":"false","aria-haspopup":!0},this.label,s("ecl-icon",{"style-class":`sc-ecl-mega-menu-${this.theme} is-first`,icon:"corner-arrow",size:"2xs",rotate:"90",slot:"icon-after"}),s("ecl-icon",{"style-class":"sc-ecl-mega-menu-"+this.theme,icon:"arrow-left",flip:"horizontal",size:"s",slot:"icon-after"})):s("ecl-link",{variant:"standalone","data-ecl-mega-menu-link":!0,path:this.path,"style-class":"ecl-mega-menu__sublink sc-ecl-mega-menu-"+this.theme},this.label),this.hasChildren&&s("div",{key:"7a737ce92d2ab0303ba28190ca50aea570db8921",class:`ecl-mega-menu__mega ecl-mega-menu__mega--level-2 sc-ecl-mega-menu-${this.theme} ${this.hasChildren?"":"ecl-mega-menu-featured-only"}`,"data-ecl-mega-menu-mega":!0},s("ul",Object.assign({key:"cfb07c00423a62ca86ba9f8e1844af8ce8accdf1",class:"ecl-mega-menu__sublist sc-ecl-mega-menu-"+this.theme},this.ariaLabel&&{"aria-label":this.ariaLabel}),s("slot",{key:"57484eb65b43d99d0684e562a1e1f9600362164a"}),s("li",{key:"bf68600c0f398d58400b757b2ba227ac27c0682f",class:"ecl-mega-menu__spacer sc-ecl-mega-menu-"+this.theme,"data-ecl-mega-menu-subitem":!0}," "),this.seeAll&&s("li",{key:"c530d682db8502e39331e843b08945c3b72bf7da",class:"ecl-mega-menu__subitem ecl-mega-menu__see-all sc-ecl-mega-menu-"+this.theme,"data-ecl-mega-menu-subitem":!0},s("ecl-link",{key:"b5d6fffc1d53c3376c71a03464dbd62b4d6b0a31","style-class":"sc-ecl-mega-menu-"+this.theme,variant:"standalone",path:this.path},this.seeAllLabel,s("ecl-icon",{key:"98b843c93a7407290252d755f4633035f2e07db7","style-class":"sc-ecl-mega-menu-"+this.theme,icon:"arrow-left",size:"xs",rotate:"180",slot:"icon-after"})))),this.hasFeatured&&s("div",{key:"81f11466593594047bf6e3233ef6e06c1131d388",class:"ecl-mega-menu__featured sc-ecl-mega-menu-"+this.theme,"data-ecl-mega-menu-featured":!0},s("div",{key:"ff885a49281c6786648bbafd072874a4857f1dc5",class:"ecl-mega-menu__featured-scrollable sc-ecl-mega-menu-"+this.theme},this.featuredTitle&&s("div",{key:"e7281b9c57e665ea969865b2b151059fbcba9b89",class:"ecl-mega-menu__featured-title sc-ecl-mega-menu-"+this.theme},this.featuredTitle),s("ul",{key:"5b702650b20d2bd47b60f2fee46bda249f5dba98",class:"ecl-mega-menu__featured-list sc-ecl-mega-menu-"+this.theme},s("slot",{key:"05b9d322719f0528c87f25178a702d318260946e",name:"featured-second"}))))))}},[260,"ecl-mega-menu-subitem",{theme:[1025],styleClass:[1,"style-class"],label:[1],path:[1],oneLevelOnly:[4,"one-level-only"],external:[4],seeAll:[4,"see-all"],hasFeatured:[4,"has-featured"],featuredTitle:[1,"featured-title"],hasChildren:[4,"has-children"],seeAllLabel:[1,"see-all-label"],ariaLabel:[1,"aria-label"]}]),d=u,b=function(){"undefined"!=typeof customElements&&["ecl-mega-menu-subitem","ecl-button","ecl-icon","ecl-indicator","ecl-link"].forEach((e=>{switch(e){case"ecl-mega-menu-subitem":customElements.get(t(e))||customElements.define(t(e),u);break;case"ecl-button":customElements.get(t(e))||c();break;case"ecl-icon":customElements.get(t(e))||m();break;case"ecl-indicator":customElements.get(t(e))||i();break;case"ecl-link":customElements.get(t(e))||n()}}))};export{d as EclMegaMenuSubitem,b as defineCustomElement}