1import{l as B}from"./vendor3.js";import{I as C,a as H}from"./vendor5.js";import{o as t,c as L,d as r,a as s,t as m,b as l,h as _,F as x,n as g,T as M,g as k,w as I,r as T,_ as D}from"./index.js";const w={key:0,class:"productrel-bkgtext"},P={class:"layout-grid"},R=["innerHTML"],j=["innerHTML"],N={key:1,class:"productrel-list"},O=["onClick"],V={class:"text-body-default text-font-headings"},q={class:"content-container"},z={key:0},A={class:"text-body-small"},E=["innerHTML"];function G(o,d,c,i,e,v){var y;const S=T("Icon"),F=T("IconBase");return e.loaded?(t(),L(M,{key:0,to:"[data-id="+c.id+"]",disabled:c.teleportDisabled},[r("section",{class:g(["productrel",e.params.style||""])},[(y=e.params)!=null&&y.backgroundText?(t(),s("div",w,m(e.params.backgroundText),1)):l("",!0),r("div",P,[(t(!0),s(x,null,_(e.params.lists,(a,u)=>{var b;return t(),s("div",{class:g(["productrel-content",[{"more-margin-top":e.params.moreMarginTop}]])},[r("span",{class:"h3",innerHTML:a.title},null,8,R),a.text?(t(),s("span",{key:0,class:"text",innerHTML:a.text},null,8,j)):l("",!0),(b=a==null?void 0:a.items)!=null&&b.length?(t(),s("ul",N,[(t(!0),s(x,null,_(a.items,(n,h)=>{var f;return t(),s("li",{class:g(["productrel-list-item",{"productrel-list-item--active":u===e.listIndex&&h===e.listSubIndex}]),onClick:p=>v.itemSelect(p,u,h)},[r("div",V,m(n.title),1),k(F,{width:24,height:24,size:30,"icon-color":e.params.style==="light"?"#0076C0":"#FFFFFF"},{default:I(()=>[k(S,{type:u===e.listIndex&&h===e.listSubIndex?"minus":"plus"},null,8,["type"])]),_:2},1032,["icon-color"]),r("div",q,[(f=n==null?void 0:n.items)!=null&&f.length?(t(),s("ul",z,[(t(!0),s(x,null,_(n.items,p=>(t(),s("li",A,[r("span",null,m(p.text),1)]))),256))])):l("",!0),n!=null&&n.text?(t(),s("div",{key:1,class:"html-text",innerHTML:n.text},null,8,E)):l("",!0)])],10,O)}),256))])):l("",!0)],2)}),256))])],2)],8,["to","disabled"])):l("",!0)}const J={name:"ProductRelated",emits:["loaded"],components:{Icon:C,IconBase:H},props:{data:Object,pageData:Object,teleportDisabled:Boolean,id:String,endpoint:String,item:Object},data(){return{colorIndex:-1,component:"",params:{},loaded:!1,listIndex:-1,listSubIndex:-1}},async created(){if(this.item!==void 0)this.component="ProductRelated",this.params=this.item,this.loaded=!0;else{const o=await B(this.endpoint,this.id);o?(this.component=o.data.component,this.params=o.data.params,this.loaded=!0,this.$emit("loaded",this.id)):this.$emit("loaded",this.id)}},methods:{itemSelect(o,d,c){const i=o.currentTarget.querySelector(".content-container");if(o.currentTarget.classList.contains("productrel-list-item--active"))i.style.height="0px";else{i.style.height="auto";const e=i.scrollHeight;i.style.height="0px",requestAnimationFrame(()=>{i.style.height=`${e}px`})}d===this.listIndex&&c===this.listSubIndex?(this.listIndex=-1,this.listSubIndex=-1):(this.listIndex=d,this.listSubIndex=c)}}};var W=D(J,[["render",G]]);export{W as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.