import{_ as q}from"./nuxt-link.a1791090.js";import{_ as R,s as G,d as $,u as J,e as K,l as E,o,c as s,a as t,b as r,g as k,F as v,h as g,m as f,q as O,i as U,t as y,a1 as Q,p as D,j as H,v as F,f as z,r as Y,S as P,n as m,k as _,Z as X,$ as Z}from"./entry.31926182.js";import{_ as ee}from"./client-only.5f5689e1.js";import{_ as te}from"./search.ae834faa.js";import{D as oe,_ as se,a as ne}from"./drawer.69668341.js";import{u as ae}from"./commons.93af0a58.js";import{_ as ie}from"./icon-zsf.932c517f.js";/* empty css                  *//* empty css                  */const ce="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAKlBMVEUAAABLS0tLS0tLS0tLS0tLS0tKSkpLS0tOTk5gYGBKSkpLS0tLS0tKSkrqWfu4AAAADXRSTlMA122gQR7qzScIjU4z05jlHgAAAEhJREFUKM9jGHZgoSAQCCP4LHfBYANcgAMiEIBQogviX0IygxkkYIAkwFl79+71CcjWhN29mwqkUOxxQHWJ7iU0p/E0MAw1AAAJ9R4gldhiWQAAAABJRU5ErkJggg==";const W=c=>(D("data-v-26cae1e7"),c=c(),H(),c),le={class:"top-box"},re=W(()=>t("img",{src:te,class:"search"},null,-1)),_e={class:"moblice"},de=W(()=>t("img",{src:se,class:"menu"},null,-1)),ue=[de],he={__name:"search-button",props:{position:{type:String}},setup(c){ae();const{$api:d}=G(),x=$([]),L=$(0),w=$(!1);J();const N=(...u)=>{const h=x.value[L.value];window.location.href="/search?keyword="+h,ga4Event("通欄","菜單元素點擊","",{dv_element:"搜索框"})};async function a(){const u=await d.serachkeyWordInit();x.value=u.data}function M(u){L.value=u}const A=()=>{w.value=!0,ga4Event("首頁","頁面元素點擊","",{dv_element:"菜單展開"})};return K(()=>{a()}),(u,h)=>{const C=E("van-swipe-item"),b=E("van-swipe"),j=ee,l=E("a-drawer");return o(),s("div",le,[t("div",{onClick:N,class:"search-box"},[re,r(b,{class:"my-swipe hidden",autoplay:"3000","show-indicators":!1,vertical:"",onChange:M},{default:k(()=>[(o(!0),s(v,null,g(f(x),(B,I)=>(o(),O(C,{key:I},{default:k(()=>[U(y(B),1)]),_:2},1024))),128))]),_:1})]),t("div",_e,[r(j,null,{default:k(()=>[r(ie)]),_:1})]),t("div",{class:"menu-box",onClick:A},ue),r(l,{visible:f(w),"onUpdate:visible":h[0]||(h[0]=B=>Q(w)?w.value=B:null),bodyStyle:{padding:"24px 16px"},placement:"right",width:333,closable:!1},{default:k(()=>[r(oe)]),_:1},8,["visible"])])}}},pe=R(he,[["__scopeId","data-v-26cae1e7"]]);const me={},ve=c=>(D("data-v-152d5763"),c=c(),H(),c),ge={class:"design-logo"},fe=ve(()=>t("a",{href:"/"},[t("img",{src:ne,alt:"100室內設計",style:{width:"136px",height:"28px"}}),t("h1",{style:{display:"none"}},"100室内設計")],-1)),we=[fe];function ye(c,d){return o(),s("div",ge,we)}const ke=R(me,[["render",ye],["__scopeId","data-v-152d5763"]]);const T=c=>(D("data-v-789d6929"),c=c(),H(),c),xe={class:"design-nav"},Ae={class:"nav-wrapper clearfix header-v"},Se=T(()=>t("div",{class:"line-title pc-big"},null,-1)),$e=T(()=>t("div",{class:"logo-title pc-big"},"實用靈感，找到家的裝修答案",-1)),Ce={class:"design-nav-row new hidden"},be=["onClick","onMouseover","onMouseout"],Be=["href"],Ie={key:0,src:ce,class:"nav-arrow",alt:""},Le=["onMouseenter","onMouseleave"],Ne={key:0,class:"popup-wrapper-width"},Me={key:0,class:"popup-wrapper"},je={class:"clearfix"},Ee=["href","onClick"],Ue=["src"],Re={class:"category-name"},De={class:"theme"},He=T(()=>t("div",{class:"p-theme"},"專題",-1)),Te={class:"c-theme clearfix"},Ve={key:1},Ge={key:0,class:"popup-wrapper"},Ke=["href","onClick"],We={key:2},qe={key:0,class:"popup-wrapper"},Je=["href","onClick"],Oe={__name:"home-nav",setup(c){const d=F(),{$api_v1:x,$cookies:L}=G();let w=[{name:"首頁",path:"/",children:[]},{name:"設計公司",path:"/company",children:[]},{name:"設計圖庫",path:"/works",children:[]},{name:"裝修攻略",path:"/article",children:[],hasChildren:!0},{name:"新家開箱",path:"/open-box-article",children:[]},{name:"好物推薦",path:"/recommendation",h1_names:["recommendation"],children:[{jump_url:"/good-institute",title:"美好居家打造所"}]},{name:"實用榜單",path:"/ranking/list",h1_names:["ranking-list"]},{name:"更多",hasChildren:!0,children:[{jump_url:"/theme",title:"專題精選"},{title:"設計影音",jump_url:"/video"},{title:"裝修報價",jump_url:"/decorationfrom?type=before_quoted_price_navigation_bar"}],h1_names:["theme","video","decorationfrom"]}];const N=z(()=>!(window.innerWidth<850)),a=Y({navList:w,labelCategory:[],hoverIndex:null,themeNavigation:[],is_open_box:!0,isShowBar:!1});function M(l){ga4Event("通欄","菜單元素點擊","",{dv_element:`tab_${l}`})}const A=l=>{ga4Event("通欄","菜單元素點擊","",{dv_element:`tab_${l.title}`})},u=l=>{gaEvent("首页","设计文章导航栏",`专题-【${l.title}】标签点击`)},h=l=>{a.hoverIndex=l},C=()=>{a.hoverIndex=null};function b(){if((document.documentElement.scrollTop||document.body.scrollTop)>80){if(a.isShowBar===!0)return;a.isShowBar=!0}else{if(a.isShowBar===!1)return;a.isShowBar=!1}}$(),$(!0);const j=()=>{x.getNavigation({filter_name_en:"nav_index_article,nav_index_topic"}).then(l=>{a.navList[3].children=l.nav_index_article,a.themeNavigation=l.nav_index_topic})};return K(()=>{j(),window.addEventListener("scroll",b)}),P(()=>{window.removeEventListener("scroll",b)}),(l,B)=>{const I=q;return N.value?(o(),s("div",{key:0,class:m(["design-nav-box",{"fixed-home":a.isShowBar}])},[t("nav",xe,[t("div",Ae,[r(f(ke),{class:"hidden"}),Se,$e,t("ul",Ce,[(o(!0),s(v,null,g(a.navList,(n,i)=>(o(),s("li",{key:i,class:m({"is-hover":i===a.hoverIndex,"hidden-link":i===4||i===5||i===6}),onClick:e=>M(n.name),onMouseover:e=>h(i),onMouseout:e=>C()},[r(I,{custom:"",to:n&&n.path},{default:k(({href:e,navigate:p,isActive:S,isExactActive:V})=>[t("a",{href:e,class:m([(n.h1_names&&n.h1_names.includes(f(d).name)||S)&&"nuxt-link-active",V&&"nuxt-link-exact-active"])},[U(y(n.name)+" ",1),n.isShow?(o(),s("img",Ie)):_("",!0)],10,Be),t("span",{class:m([(n.h1_names&&n.h1_names.includes(f(d).name)||S)&&"active-line",V&&"active-line"])},null,2)]),_:2},1032,["to"])],42,be))),128))]),(o(!0),s(v,null,g(a.navList,(n,i)=>X((o(),s("div",{key:i,class:m(["pop-nav-menu",{"more-style":i===7,"more-style-good":i===5}]),onMouseenter:e=>h(i),onMouseleave:e=>C()},[i===3?(o(),s("div",Ne,[n.children&&n.children.length?(o(),s("div",Me,[t("ul",je,[(o(!0),s(v,null,g(n.children,(e,p)=>(o(),s("li",{key:p,class:"category-item"},[t("a",{href:e.jump_url,onClick:S=>A(e)},[t("img",{src:e.img_url,alt:""},null,8,Ue),t("div",Re,y(e.title),1)],8,Ee)]))),128))]),t("div",De,[He,t("ul",Te,[(o(!0),s(v,null,g(a.themeNavigation,e=>(o(),s("li",{key:e.id},[r(I,{to:e.jump_url,onClick:p=>u(e)},{default:k(()=>[U(y(e.title),1)]),_:2},1032,["to","onClick"])]))),128))])])])):_("",!0)])):_("",!0),i===5?(o(),s("div",Ve,[n.children&&n.children.length?(o(),s("div",Ge,[(o(!0),s(v,null,g(n.children,(e,p)=>(o(),s("div",{key:p,class:"more-item more-item-good"},[t("a",{href:e.jump_url,onClick:S=>A(e)},[t("div",{class:m([e.jump_url.includes(f(d).name)?"active-bold":""])},y(e.title),3)],8,Ke)]))),128))])):_("",!0)])):_("",!0),i===7?(o(),s("div",We,[n.children&&n.children.length?(o(),s("div",qe,[(o(!0),s(v,null,g(n.children,(e,p)=>(o(),s("div",{key:p,class:"more-item"},[t("a",{href:e.jump_url,onClick:S=>A(e)},[t("div",{class:m([e.jump_url.includes(f(d).name)?"active-bold":""])},y(e.title),3)],8,Je)]))),128))])):_("",!0)])):_("",!0)],42,Le)),[[Z,a.hoverIndex===i]])),128))]),r(pe,{position:"homepage",class:"searchButton"})])],2)):_("",!0)}}},ot=R(Oe,[["__scopeId","data-v-789d6929"]]);export{ot as N};
