import{z as T,F as C,ai as N,aN as S,m as s,bW as P,N as D,P as r,Q as c,R as t,X as n,_ as d,W as o,a1 as f,e as k,a2 as L,a0 as O,aL as $,aP as q}from"./vendor-D8NNcBCx.js";import{g as F,dC as Q,bp as R,Q as W,dD as G}from"./index-ID5VX6TZ.js";import{u as A}from"./useBreadcrumbs-DJ2ZfPFw.js";import{_ as M}from"./category.vue_vue_type_style_index_0_lang-wI_dki0N.js";import"./filters-popup-sidebar.vue_vue_type_style_index_0_lang-D6Lio4vW.js";import"./product-card-O4aFQ9Xr.js";import"./product-skeleton-grid-CHXXzg4E.js";import"./product-skeleton-list-BzGuXQGa.js";function X(l){const{storeId:m,cultureName:i}=F;return T(Q,{storeId:m,cultureName:i,id:l})}const j={class:"brand-page"},H={key:1,class:"brand-page__banner","data-test-id":"brand-banner"},J={key:2,class:"brand-page__logo","data-test-id":"brand-logo"},ne=C({__name:"brand",props:{brandId:{}},setup(l){const i=S(l,"brandId"),y=s(()=>G(e.value?.brandPropertyValue)),{t:h}=N(),{updateLocalizedUrl:V}=R(),u=$(q),{result:B,loading:x}=X(i.value??""),e=s(()=>B.value?.brand),p=s(()=>e.value?.bannerUrl||e.value?.logoUrl),g=s(()=>{if(!u.greaterOrEqual("lg").value)return u.greaterOrEqual("md").value?"lg":u.greaterOrEqual("sm").value?"md":"sm"}),{title:b}=W(e.value?.name),w=A(()=>[{title:h("pages.brands.title"),route:(()=>{const a=e.value?.permalink??"";return`/${(a.startsWith("/")?a.slice(1):a).split("/")[0]}`})()},{title:e.value?.name??""}]);return P({title:b,keywords:e.value?.name,description:e?.value?.description,ogUrl:window.location.toString(),ogTitle:b,ogDescription:e?.value?.description,ogImage:e?.value?.logoUrl,ogType:"website"}),D(e,()=>{V(e.value?.permalink)},{immediate:!0}),(a,z)=>{const _=r("VcBreadcrumbs"),U=r("VcTypography"),v=r("VcImage"),E=r("VcContainer"),I=r("VcEmptyView");return t(),c("div",j,[n(E,{class:"brand-page__top-container","has-bg-image":!1},{default:f(()=>[n(_,{class:"brand-page__breadcrumbs",items:k(w)},null,8,["items"]),p.value?(t(),d(U,{key:0,tag:"h1",class:"brand-page__title","data-test-id":"brand-title"},{default:f(()=>[L(O(e.value?.name),1)]),_:1})):o("",!0),e.value?.bannerUrl?(t(),c("div",H,[n(v,{src:e.value?.bannerUrl,lazy:"",alt:e.value?.name,class:"brand-page__banner-image","size-suffix":g.value},null,8,["src","alt","size-suffix"])])):e.value?.logoUrl?(t(),c("div",J,[n(v,{src:e.value?.logoUrl,lazy:"",alt:e.value?.name,class:"brand-page__logo-image","size-suffix":g.value},null,8,["src","alt","size-suffix"])])):o("",!0),e.value?(t(),d(M,{key:3,"data-test-id":"brand-products",class:"brand-page__products","filters-orientation":"horizontal",filter:y.value,"hide-total":"","view-mode":"grid",title:p.value?a.$t("pages.brand.products_title"):e.value?.name,"columns-amount-desktop":"5","has-bg-image":!1,"facets-to-hide":["BRAND"]},null,8,["filter","title"])):o("",!0)]),_:1}),!k(x)&&!e.value?(t(),d(I,{key:0,text:a.$t("pages.brands.no_results"),icon:"outline-stock"},null,8,["text"])):o("",!0)])}}});export{ne as default};
//# sourceMappingURL=brand-5DzefQwh.js.map
