import{d as ue,c as n,r as S,k as ce,a7 as ve,o as pe,a6 as de,e as s,f as r,g as l,t as m,p as v,B as f,C as Z,F as N,A as $,ar as fe,E as he,m as me,a5 as ye,h as F}from"./CQ5rtXCu.js";import{_ as xe,r as be}from"./NNoDK9ij.js";import{N as we}from"./BdfaCmUh.js";import{m as ge}from"./DBCQJO2L.js";const ke={key:0,class:"hidden border-b border-[#d9d9d9] text-[#999] min-[992px]:block"},_e={key:0,class:"w-1/2 pr-[15px]"},De={class:"ml-auto flex w-1/2 items-center justify-end gap-5 pr-5"},Ce=["href","title"],Be={key:0},Se={class:"text-[16px]"},ze=["href","title"],Ae=["aria-label"],Ee={class:"flex"},Ie=["onMouseenter","onFocusin"],Le=["href","title","aria-expanded","onClick","onKeydown"],Ne=["inert"],Me=["aria-label","title","aria-expanded"],Te=["aria-modal","aria-label","aria-hidden","inert"],Ke={class:"relative h-[70px] bg-[var(--theme-primary-color,#1c2b4a)] pl-[25px] text-[16px] leading-[70px] text-[var(--theme-primary-contrast,#fff)]"},$e=["aria-label"],Fe=["inert"],Pe=["href","title","aria-expanded","onClick"],je={key:0,class:"h-3 w-2",viewBox:"0 0 8 12",fill:"none",stroke:"currentColor","aria-hidden":"true"},Oe=["inert"],Re=["aria-label"],Ue={class:"max-h-[calc(100dvh-130px)] overflow-y-auto"},Ve=["href","title","onClick"],qe={key:0,class:"h-3 w-2",viewBox:"0 0 8 12",fill:"none",stroke:"currentColor","aria-hidden":"true"},ee="mx-auto w-full max-w-[1400px] px-[15px] min-[601px]:w-[95%]",Je=ue({__name:"NavLayout40",props:{navData:{default:()=>({})},generatorPreview:{type:Boolean,default:!1},positioning:{default:"static"}},setup(R){const k=R,te=[{id:"home",nameDisplay:"首页",path:"/"},{id:"company",nameDisplay:"走进我们",path:"/company.html",children:[{nameDisplay:"公司介绍",path:"/company.html"},{nameDisplay:"企业文化",path:"/company.html#culture"},{nameDisplay:"企业容貌",path:"/factory.html"},{nameDisplay:"生产设备",path:"/device.html"},{nameDisplay:"企业荣誉",path:"/honor.html"},{nameDisplay:"科技创新",path:"/patent.html"},{nameDisplay:"员工风采",path:"/staff.html"},{nameDisplay:"成功案例",path:"/case.html"}]},{id:"product",nameDisplay:"产品中心",path:"/product.html",children:[{nameDisplay:"焙烧多功能机组",path:"/10.html"},{nameDisplay:"铝电解多功能机组",path:"/15.html"},{nameDisplay:"吸卸料天车",path:"/11.html"},{nameDisplay:"夹钳天车",path:"/12.html"},{nameDisplay:"堆垛天车",path:"/13.html"},{nameDisplay:"编解组清理机",path:"/14.html"},{nameDisplay:"单梁起重机",path:"/16.html"},{nameDisplay:"双梁起重机",path:"/17.html"},{nameDisplay:"门式起重机",path:"/33.html"},{nameDisplay:"抓斗起重机",path:"/35.html"},{nameDisplay:"电动葫芦",path:"/34.html"}]},{id:"service",nameDisplay:"营销服务",path:"/service.html"},{id:"news",nameDisplay:"新闻资讯",path:"/news.html",children:[{nameDisplay:"行业动态",path:"/19.html"},{nameDisplay:"公司新闻",path:"/20.html"},{nameDisplay:"媒体视频",path:"/video.html"}]},{id:"contact",nameDisplay:"联系我们",path:"/contact.html"}],o=n(()=>k.navData),M=n(()=>Array.isArray(o.value.componentConfig)?o.value.componentConfig[0]||{}:o.value.componentConfig||{});function _(e){return String(e??"").trim()}function D(e,a=""){return _(e)||(k.generatorPreview?a:"")}const x=n(()=>D(o.value.info?.title||o.value.detailRecord?.full_name,"吸料天车_吸卸料_堆垛_焙烧多功能天车_焙烧多功能机组_某某科技公司")),ae=n(()=>({...o.value,info:{...o.value.info,title:x.value}})),U=n(()=>D(o.value.logoUrl,ge["logo.png"])),P=n(()=>D(o.value.welcomeText||o.value.info?.description,"欢迎访问吸料天车_吸卸料_堆垛_焙烧多功能天车_焙烧多功能机组_某某科技公司网站！")),z=n(()=>D(o.value.phone||o.value.detailRecord?.contacts?.find(e=>e.phone||e.mobile)?.phone||o.value.detailRecord?.contacts?.find(e=>e.phone||e.mobile)?.mobile,"10000000000")),V=n(()=>D(M.value.phone,"咨询服务电话")),C=n(()=>D(M.value.navigation,"网站导航")),y=n(()=>Array.isArray(o.value.navItems)&&o.value.navItems.length?o.value.navItems:k.generatorPreview?te:[]),p=e=>_(e.nameDisplay||e.name),b=e=>_(o.value.getCachedLink?.(e)||e.path||e.href)||"#",d=(e,a)=>e.id??e.name??a,w=e=>Array.isArray(e.children)&&e.children.length>0,A=n(()=>y.value.find(e=>e.path==="/")||y.value[0]),le=n(()=>A.value?b(A.value):"/"),B=n(()=>y.value.find(e=>_(M.value.contactUs)&&p(e)===_(M.value.contactUs)||/(?:^|\/)contact(?:\.html)?\/?$/.test(_(e.path)))),oe=n(()=>y.value.filter(e=>e!==A.value)),q=n(()=>!!(P.value||z.value||B.value)),ne=n(()=>!!(U.value||x.value||y.value.length||q.value)),E=S(!1),c=S(null),h=S(!1),I=S([]),g=n(()=>I.value[I.value.length-1]),T=S(null),H=S(null);let W="",j=!1;const Y=n(()=>k.positioning==="absolute"),se=n(()=>!Y.value&&(E.value||k.positioning==="fixed"));function re(e){return e===(o.value.activeIndex??(k.generatorPreview?0:-1))}function L(){h.value=!1,I.value=[]}function K(e,a){const t=o.value.handleParentClick||o.value.handleNavClick;t?t(e,a):b(e)==="#"&&a.preventDefault(),L()}function G(e){o.value.handleChildClick?.(e),c.value=null,L()}function J(e,a){w(e)?(a.preventDefault(),I.value.push(e)):K(e,a)}function ie(e){if(e.key==="Escape"){e.preventDefault(),L(),c.value=null;return}if(!h.value||e.key!=="Tab"||!T.value)return;const a=Array.from(T.value.querySelectorAll("a[href], button:not([disabled])")).filter(u=>u.getClientRects().length>0),t=a[0],i=a[a.length-1];e.shiftKey&&document.activeElement===t?(e.preventDefault(),i?.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),t?.focus())}function O(){E.value=window.scrollY>50}function Q(){window.innerWidth>=992&&L()}function X(){j&&(document.body.style.overflow=W,j=!1)}return ce(h,async e=>{typeof document>"u"||(e?(W=document.body.style.overflow,document.body.style.overflow="hidden",j=!0,await ve(),T.value?.querySelector("button")?.focus()):(X(),H.value?.focus()))}),pe(()=>{O(),window.addEventListener("scroll",O,{passive:!0}),window.addEventListener("resize",Q)}),de(()=>{window.removeEventListener("scroll",O),window.removeEventListener("resize",Q),X()}),(e,a)=>ne.value?(s(),r("div",{key:0,class:"relative z-50 bg-white text-[14px] leading-[1.5] text-[#333]",onKeydown:ie},[q.value?(s(),r("div",ke,[l("div",{class:f([ee,"flex items-center leading-[40px]"])},[P.value?(s(),r("p",_e,m(P.value),1)):v("",!0),l("div",De,[z.value?(s(),r("a",{key:0,href:`tel:${z.value.replace(/[^+\d]/g,"")}`,title:z.value,class:"whitespace-nowrap hover:text-[var(--theme-primary-color,#1c2b4a)]"},[V.value?(s(),r("span",Be,m(V.value)+"：",1)):v("",!0),l("strong",Se,m(z.value),1)],8,Ce)):v("",!0),B.value?(s(),r("a",{key:1,href:b(B.value),title:p(B.value),class:"whitespace-nowrap hover:text-[var(--theme-primary-color,#1c2b4a)]",onClick:a[0]||(a[0]=t=>K(B.value,t))},m(p(B.value)),9,ze)):v("",!0)])])])):v("",!0),l("div",{class:f(["left-0 right-0 top-0 z-50 bg-white",se.value?"fixed shadow-[2px_2px_5px_#c7c7c7]":Y.value?"relative":R.positioning])},[l("div",{class:f([ee,"relative flex items-center"])},[Z(xe,{"nav-data":ae.value,href:le.value,"logo-src":U.value,class:f(["my-[10px] h-[50px] basis-4/5 transition-all duration-[400ms] min-[766px]:my-0 min-[766px]:h-[100px] min-[992px]:basis-2/5",E.value?"my-[5px]! min-[766px]:my-0! min-[766px]:h-[60px]!":""]),"logo-class":"max-h-full max-w-full object-contain","company-class":"font-semibold text-[var(--theme-primary-color,#1c2b4a)]","subtitle-class":"font-normal text-[#999]",onClick:a[1]||(a[1]=t=>A.value&&K(A.value,t))},null,8,["nav-data","href","logo-src","class"]),y.value.length?(s(),r("nav",{key:0,class:"hidden min-w-0 basis-3/5 min-[992px]:block","aria-label":C.value||x.value||void 0},[l("ul",Ee,[(s(!0),r(N,null,$(y.value,(t,i)=>(s(),r("li",{key:d(t,i),class:"group relative min-w-0 flex-1",onMouseenter:u=>c.value=d(t,i),onMouseleave:a[2]||(a[2]=u=>c.value=null),onFocusin:u=>c.value=d(t,i),onFocusout:a[3]||(a[3]=u=>!u.currentTarget.contains(u.relatedTarget)&&(c.value=null))},[l("a",{href:b(t),title:p(t),"aria-expanded":w(t)?c.value===d(t,i):void 0,class:f(["relative block whitespace-nowrap text-center text-[16px] transition-all duration-[400ms] after:absolute after:bottom-0 after:left-1/2 after:h-[3px] after:-translate-x-1/2 after:bg-[#fa331c] after:transition-[width] after:duration-[400ms] hover:bg-[var(--theme-secondary-color,var(--theme-primary-color,#1c2b4a))] hover:text-[var(--theme-primary-contrast,#fff)] focus-visible:outline-2 focus-visible:outline-offset-[-3px]",[E.value?"leading-[60px]":"leading-[100px]",re(i)||c.value===d(t,i)?"bg-[var(--theme-secondary-color,var(--theme-primary-color,#1c2b4a))] text-[var(--theme-primary-contrast,#fff)] after:w-full":"text-[#333] after:w-0 group-hover:after:w-full"]]),style:me(ye(be)(o.value.title)),onClick:u=>K(t,u),onKeydown:fe(he(u=>{c.value=d(t,i),u.currentTarget.parentElement?.querySelector(".navbar-desktop-submenu a")?.focus()},["prevent"]),["down"])},m(p(t)),47,Le),w(t)?(s(),r("div",{key:0,class:f(["absolute left-0 top-full z-20 grid w-max transition-[grid-template-rows,opacity] duration-[400ms]",c.value===d(t,i)?"grid-rows-[1fr] opacity-100":"pointer-events-none grid-rows-[0fr] opacity-0"]),inert:c.value!==d(t,i)},[l("div",{class:f(["min-h-0",c.value===d(t,i)?"overflow-visible":"overflow-hidden"])},[Z(we,{items:t.children,"get-item-href":b,"menu-class":"bg-[#f8f9fb]","menu-style":{minWidth:"0",width:"max-content"},"link-class":"justify-between! whitespace-nowrap px-7 text-left text-[14px] leading-[40px] text-[#333] transition-colors hover:bg-[var(--theme-secondary-color,var(--theme-primary-color,#1c2b4a))] hover:text-[var(--theme-primary-contrast,#fff)] focus-visible:bg-[var(--theme-secondary-color,var(--theme-primary-color,#1c2b4a))] focus-visible:text-[var(--theme-primary-contrast,#fff)]",onItemClick:G},null,8,["items"])],2)],10,Ne)):v("",!0)],40,Ie))),128))])],8,Ae)):v("",!0),y.value.length?(s(),r("button",{key:1,ref_key:"menuButton",ref:H,type:"button",class:f(["absolute right-[15px] flex h-10 w-10 flex-col gap-[6px] pt-[6px] focus-visible:outline-2 focus-visible:outline-offset-4 min-[992px]:hidden",E.value?"top-[13px]":"top-[18px]"]),"aria-label":C.value||x.value,title:C.value||x.value,"aria-expanded":h.value,onClick:a[4]||(a[4]=t=>h.value=!0)},[(s(),r(N,null,$(3,t=>l("span",{key:t,class:"h-[3px] w-10 bg-[var(--theme-primary-color,#1c2b4a)]"})),64))],10,Me)):v("",!0)])],2),l("div",{ref_key:"drawer",ref:T,role:"dialog","aria-modal":h.value?!0:void 0,"aria-label":C.value||x.value,"aria-hidden":!h.value,inert:!h.value,class:f(["fixed inset-0 z-[100] overflow-hidden bg-white transition-transform min-[992px]:hidden",h.value?"translate-x-0 duration-[440ms]":"translate-x-full duration-[640ms]"])},[l("div",Ke,[F(m(C.value),1),l("button",{type:"button",class:"absolute right-[15px] top-[18px] h-10 w-10 focus-visible:outline-2","aria-label":`${C.value||x.value} ×`,onClick:L},[...a[6]||(a[6]=[l("svg",{viewBox:"0 0 40 40",class:"h-10 w-10",fill:"none",stroke:"currentColor","stroke-width":"3","aria-hidden":"true"},[l("path",{d:"m6 6 28 28M6 34 34 6"})],-1)])],8,$e)]),l("ul",{class:"h-[calc(100dvh-70px)] overflow-y-auto",inert:!!g.value},[(s(!0),r(N,null,$(oe.value,(t,i)=>(s(),r("li",{key:d(t,i),class:"border-b border-[#f2f2f2]"},[l("a",{href:b(t),title:p(t),"aria-expanded":w(t)?!1:void 0,class:"flex w-[94%] items-center justify-between px-[8%] text-[16px] leading-[60px] text-[#666] focus-visible:outline-2 focus-visible:outline-inset",onClick:u=>J(t,u)},[F(m(p(t)),1),w(t)?(s(),r("svg",je,[...a[7]||(a[7]=[l("path",{d:"m1 1 5 5-5 5"},null,-1)])])):v("",!0)],8,Pe)]))),128))],8,Fe),l("div",{class:f(["absolute inset-x-0 bottom-0 top-[70px] bg-white transition-transform duration-[400ms]",g.value?"translate-x-0":"translate-x-full"]),inert:!g.value},[g.value?(s(),r(N,{key:0},[l("button",{type:"button",class:"flex w-full items-center gap-[10px] bg-[#fa331c] px-[8%] text-left text-[18px] leading-[60px] text-white focus-visible:outline-2 focus-visible:outline-inset","aria-label":p(g.value),onClick:a[5]||(a[5]=t=>I.value.pop())},[a[8]||(a[8]=l("svg",{class:"h-3 w-2",viewBox:"0 0 8 12",fill:"none",stroke:"currentColor","aria-hidden":"true"},[l("path",{d:"m7 1-5 5 5 5"})],-1)),F(m(p(g.value)),1)],8,Re),l("ul",Ue,[(s(!0),r(N,null,$(g.value.children,(t,i)=>(s(),r("li",{key:d(t,i),class:"border-b border-[#f2f2f2]"},[l("a",{href:b(t),title:p(t),class:"flex items-center justify-between px-[8%] text-[16px] leading-[50px] text-[#666] hover:text-[var(--theme-primary-color,#1c2b4a)] focus-visible:outline-2 focus-visible:outline-inset",onClick:u=>w(t)?J(t,u):G(u)},[F(m(p(t)),1),w(t)?(s(),r("svg",qe,[...a[9]||(a[9]=[l("path",{d:"m1 1 5 5-5 5"},null,-1)])])):v("",!0)],8,Ve)]))),128))])],64)):v("",!0)],10,Oe)],10,Te)],32)):v("",!0)}});export{Je as default};
