import{_ as D,H as I,G as T,bc as C,i as x,R as O,r as d,o as s,a as u,w as f,b as V,v,q as m,l as h,p as S,u as L}from"./main-BDtKGhFI.js";import{S as B}from"./SearchFactFinderFi-DlAHNPUA.js";import"./PaginationProgressBar-DQ7eJ3mz.js";import"./FacetsMenuFi-C8GRmyIH.js";import"./FacetsSelectionFi-D2gIuEVQ.js";import"./factFinderNgFacetFragment-CIrlUR3D.js";import"./infinite-loading-vue3-ts.esm-CdJoyCOm.js";import"./toFilterInput-BhXUZwu6.js";import"./index-BmigA8Zv.js";import"./trackingMixin.vue_vue_type_script_lang-DSHkIFY3.js";import"./IconAttributeItemFi-C2H3gsNW.js";import"./catalogAttributesMixin-CL45_ybt.js";import"./catalogMixin-CPTFZDM8.js";import"./priceCurrencyMixin-CKEVFsHP.js";var y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getProductCateogoryData"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"language"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCategoryById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"language"},value:{kind:"Variable",name:{kind:"Name",value:"language"}}},{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"CategoryName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"TextList"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"Key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Value"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:254}};y.loc.source={body:`query getProductCateogoryData( $baseSiteId: BaseSiteId! $language: String! $id: String! ) { getCategoryById( baseSiteId: $baseSiteId language: $language id: $id ) { CategoryName TextList { Key Value } } } `,name:"GraphQL request",locationOffset:{line:1,column:1}};function g(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){g(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){g(i,t)}),e.definitions&&e.definitions.forEach(function(i){g(i,t)})}var k={};(function(){y.definitions.forEach(function(t){if(t.name){var n=new Set;g(t,n),k[t.name.value]=n}})})();function b(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function M(e,t){var n={kind:e.kind,definitions:[b(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=k[t]||new Set,r=new Set,a=new Set;for(i.forEach(function(o){a.add(o)});a.size>0;){var p=a;a=new Set,p.forEach(function(o){if(!r.has(o)){r.add(o);var c=k[o]||new Set;c.forEach(function(_){a.add(_)})}})}return r.forEach(function(o){var c=b(e,o);c&&n.definitions.push(c)}),n}M(y,"getProductCateogoryData");const R={name:"ProductCategory",components:{HeadlineFi:I,GridContainerFi:T,LdJson:C,SearchFactFinderFi:B,ComponentWrapper:x,RichtextFi:O},props:{fields:{type:Object,default:()=>{}}},data(){return{getCategoryById:{CategoryName:"",TextList:[]}}},apollo:{getCategoryById:{query:y,variables(){return{id:this.categoryPathIdRoot,baseSiteId:this.$fischer.baseSiteId(),language:this.$fischer.catalogLocale()}}}},computed:{categoryPathIdRoot(){return this.$fischer.catalogId("1001340176")},textsMap(){const e={};return this.getCategoryById.TextList.forEach(t=>{e[t.Key]=t.Value}),e},categoryDescription(){return this.textsMap.SEO_DETAILS&&this.textsMap.SEO_DETAILS!==""?this.textsMap.SEO_DETAILS:this.textsMap.DOKBSTMARKDESCR}},methods:{toLdJson({masters:e}){const t=`${this.$fischer.hostUrlBase()}${this.$fischer.pages.products().url}`,n=e.hits.filter(i=>{var r;return(r=i.masterValuesObject.catalogCategoryData)==null?void 0:r.Slug}).map((i,r)=>({"@type":"ListItem",position:r+1,url:`${t}${i.masterValuesObject.catalogCategoryData.Slug}`,name:i.masterValuesObject.catalogCategoryData.CategoryName,image:i.masterValuesObject.catalogCategoryData.imageUrl}));return JSON.stringify({"@context":"https://schema.org/","@type":"ItemList",numberOfItems:e.totalHits,itemListElement:n})}}},w={key:0,class:"product-category__kat-pos fi-col-span-12 fi-col-start-1 sm:fi-col-span-8 sm:fi-col-start-3 lg:fi-col-span-4 lg:fi-col-start-5"},A={class:"fi-col-start-1 fi-col-end-13 sm:fi-col-start-2 sm:fi-col-end-12 md:fi-col-start-3 md:fi-col-end-11 lg:fi-col-start-4 lg:fi-col-end-10"},P={class:"product-category__description"};function K(e,t,n,i,r,a){const p=d("headline-fi"),o=d("grid-container-fi"),c=d("ld-json"),_=d("search-fact-finder-fi"),N=d("richtext-fi"),E=d("component-wrapper");return s(),u(E,{class:"product-category"},{default:f(()=>[a.textsMap.KAT_POS||a.textsMap.BEZEICHNUNG?(s(),u(o,{key:0},{default:f(()=>[a.textsMap.KAT_POS?(s(),V("div",w,v(a.textsMap.KAT_POS),1)):m("",!0),a.textsMap.BEZEICHNUNG?(s(),u(p,{key:1,class:"product-category__name fi-col-span-12 fi-col-start-1 sm:fi-col-span-10 sm:fi-col-start-2 lg:fi-col-span-6 lg:fi-col-start-4",tag:"h1",size:60,"html-content":a.textsMap.BEZEICHNUNG},null,8,["html-content"])):m("",!0)]),_:1})):m("",!0),h(_,{ref:l=>e.search=l,class:"fi-col-span-full","query-prefix":"[category]:","click-source":"category","category-path-id-root":a.categoryPathIdRoot,fields:n.fields,"attach-breadcrumb":""},{withResults:f(({searchFactFinderNg:l})=>[l!=null&&l.masters?(s(),u(c,{key:0,json:a.toLdJson(l)},null,8,["json"])):m("",!0)]),_:1},8,["category-path-id-root","fields"]),a.textsMap.DOKBSTMETADESCRTITLE||a.categoryDescription?(s(),u(o,{key:1},{default:f(()=>[S("div",A,[S("div",P,[a.textsMap.DOKBSTMETADESCRTITLE?(s(),u(p,{key:0,tag:"h2",size:48,class:"product-category__description__headline"},{default:f(()=>[L(v(a.textsMap.DOKBSTMETADESCRTITLE),1)]),_:1})):m("",!0),h(N,{class:"product-category__description__text","html-content":{value:a.categoryDescription}},null,8,["html-content"])])])]),_:1})):m("",!0)]),_:1})}const ee=D(R,[["render",K],["__scopeId","data-v-0d19461d"]]);export{ee as default};