import{a as C,b,_ as k}from"./WebLeadingCompaniesFlyout-U1HLTkec.mjs";import{_ as y,o as r,c as i,a as m,d as u,t as F,v as T,w as p,F as g,r as f,b as v,i as h,aB as S,f as B,a8 as H,N as D,n as q}from"./entry.DPwc-EV0.js";import"./WebHTML-UohjwGfe.mjs";import"./WebImage-BBQZzdK6.mjs";import"./index-CngUKuta.mjs";import"./WebContentList-W4TiV2An.mjs";import"./WebContentItem-DFVYreAc.mjs";import"./useImageUrl-1XbeiwSF.mjs";const L={props:{link:{type:String},name:{type:String},sectionId:{type:Number},companies:{type:Array},isFlyoutHovered:{type:Boolean,default:!1},flyout:{type:Object},hoverBackgroundColor:{type:String,required:!0},hoverTextColor:{type:String,required:!0},autoExpand:{type:Boolean,default:!1},flyoutDirection:{type:String},numColumns:{type:Number}},emits:["hoverChange"],data(){return{expanded:this.autoExpand}},computed:{noCompanies(){var o;return!((o=this.companies)!=null&&o.length)}},methods:{toggle(){this.expanded=!this.expanded},hoverChange(o,n){this.$emit("hoverChange",o,n)}}},O={class:"ebm-leading-companies-section"},E=["disabled"],w={key:0},N={key:0,class:"children"};function W(o,n,e,_,a,t){const c=B,d=C;return r(),i("div",O,[m("button",{class:T(["heading",t.noCompanies?"no-companies":""]),disabled:t.noCompanies,onClick:n[0]||(n[0]=(...s)=>t.toggle&&t.toggle(...s))},[u(c,{icon:a.expanded||t.noCompanies?"mdi:minus-circle-outline":"mdi:plus-circle-outline",class:"icon",disabled:t.noCompanies},null,8,["icon","disabled"]),m("span",null,F(e.name),1)],10,E),u(S,{name:"fade"},{default:p(()=>[a.expanded?(r(),i("div",w,[t.noCompanies?h("",!0):(r(),i("div",N,[(r(!0),i(g,null,f(e.companies,s=>(r(),v(d,{key:s.href,company:s,"hover-background-color":e.hoverBackgroundColor,"hover-text-color":e.hoverTextColor,"flyout-direction":e.flyoutDirection,"is-flyout-hovered":s.name===e.flyout.company.name?e.isFlyoutHovered:!1,"num-columns":e.numColumns,onHoverChange:t.hoverChange},null,8,["company","hover-background-color","hover-text-color","flyout-direction","is-flyout-hovered","num-columns","onHoverChange"]))),128))]))])):h("",!0)]),_:1})])}const I=y(L,[["render",W],["__scopeId","data-v-791853ee"]]),A={props:{sections:{type:Array,required:!0},hoverBackgroundColor:{type:String,required:!0},hoverTextColor:{type:String,required:!0},autoExpand:{type:Boolean,default:!1}},data(){return{localData:this.sections.map(n=>({...n,expanded:!1})),flyout:{pos:{x:0,y:0},company:{},hoverStatus:"off"},isFlyoutHovered:!1}},computed:{showFlyout(){return this.flyout.hoverStatus==="on"||this.isFlyoutHovered}},methods:{columnContents(o){return this.localData.slice(o*(this.localData.length/3),this.localData.length/3+o*(this.localData.length/3))},handleFlyoutHoverOn(){this.currentTimeout&&clearTimeout(this.currentTimeout),this.isFlyoutHovered=!0},handleFlyoutHoverOff(){this.currentTimeout=setTimeout(()=>{this.isFlyoutHovered=!1},300)},updateFlyoutData(o,n){this.currentTimeout=n,!(o.hoverStatus==="off"&&o.company.name!==this.flyout.company.name)&&(this.flyout={...this.flyout,...o})}}},V={class:"leading-companies-tree"},j={class:"sections"};function z(o,n,e,_,a,t){const c=I,d=b,s=D;return r(),i("div",V,[m("div",j,[(r(!0),i(g,null,f(a.localData,(l,x)=>(r(),i("div",{key:l.href,class:"section"},[u(c,{link:l.href,name:l.name,companies:l.companies,"auto-expand":e.autoExpand,"section-id":l.id,"hover-text-color":e.hoverTextColor,"hover-background-color":e.hoverBackgroundColor,"flyout-direction":x>a.localData.length/3?"left":"right",flyout:a.flyout,"num-columns":3,onHoverChange:t.updateFlyoutData},null,8,["link","name","companies","auto-expand","section-id","hover-text-color","hover-background-color","flyout-direction","flyout","onHoverChange"])]))),128))]),u(s,null,{default:p(()=>[(r(),v(H,{to:"body"},[m("div",{onMouseover:n[0]||(n[0]=(...l)=>t.handleFlyoutHoverOn&&t.handleFlyoutHoverOn(...l)),onMouseleave:n[1]||(n[1]=(...l)=>t.handleFlyoutHoverOff&&t.handleFlyoutHoverOff(...l))},[u(d,{company:a.flyout.company,"pos-x":a.flyout.pos.x,"pos-y":a.flyout.pos.y,direction:a.flyout.direction,show:t.showFlyout},null,8,["company","pos-x","pos-y","direction","show"])],32)]))]),_:1})])}const M=y(A,[["render",z],["__scopeId","data-v-93da5749"]]),G={props:{sections:{type:Array,required:!0},headingBackgroundColor:{type:String,required:!0},subText:{type:[Object,String]},headingText:{type:[Object,String]},headingTextColor:{type:String,required:!0},allCompaniesLink:{type:String},hoverBackgroundColor:{type:String,required:!0},hoverTextColor:{type:String,required:!0},autoExpand:{type:Boolean,default:!1}}},J={key:0,class:"ebm-leading-companies__all-companies-link"},K=["href"];function P(o,n,e,_,a,t){const c=k,d=M;return r(),i("div",{class:"ebm-leading-companies",style:q({fontFamily:o.$ss.primaryFontFamily})},[u(c,{"heading-background-color":e.headingBackgroundColor,"heading-text":e.headingText,"heading-text-color":e.headingTextColor,"sub-text":e.subText},null,8,["heading-background-color","heading-text","heading-text-color","sub-text"]),u(d,{sections:e.sections,"hover-background-color":e.hoverBackgroundColor,"hover-text-color":e.hoverTextColor,"auto-expand":e.autoExpand},null,8,["sections","hover-background-color","hover-text-color","auto-expand"]),e.allCompaniesLink?(r(),i("div",J,[m("a",{href:e.allCompaniesLink},"View All Companies >",8,K)])):h("",!0)],4)}const oe=y(G,[["render",P],["__scopeId","data-v-2caf7dd4"]]);export{oe as default};