1import{E as w,r as $,z as D,H as v,b as l,c as i,d as s,A as f,n,B as p,C as d,x as u,D as g,t as y,F as S,e as B,f as C,K as z,a1 as T,L as U}from"./index-Dvm4xnRL.js";import{v as b}from"./ds-atom-button-jfKR4OCb.js";import{s as V}from"./_plugin-vue_export-helper-CHgC5LLL-lGy7RumW.js";import{_ as M}from"./watson-atom-image-DREf4p4s.js";import{_}from"./watson-atom-dynamic-text-CSdFsUVh.js";import{_ as N}from"./watson-atom-link-B3CUoIg2.js";import"./ds-atom-icon-Bu6h7vIJ.js";const j={class:"card-list-links-container"},A=["src","alt"],L={class:"card-list-links__content-head"},E={key:0},F={__name:"ds-organism-card-list-links",props:{imageType:{type:String,default:null},src:{type:String,default:null},alt:{type:String,default:null},heading:{type:String,default:null},headingUrl:{type:String,default:null},items:{type:Array,default:()=>[]},alignment:{type:String,default:"left"},enableShowMoreButton:{type:Boolean,default:!1},enableBackground:{type:Boolean,default:!1},enableDivider:{type:Boolean,default:!1},backgroundColor:{type:String,default:null},dividerColor:{type:String,default:null},linkComponent:{type:[String,Object],default:"a"}},setup(e){w(a=>({"4ad6597e":o.backgroundColor,"6dd4f9c1":o.dividerColor}));const r=$(!1),m=D(),o=e,k=v(()=>o.enableShowMoreButton?r.value?o.items:o.items.slice(0,4):o.items);return(a,h)=>(l(),i("article",j,[s("div",{class:n(["card-list-links",{"card-list-links--background":e.enableBackground}])},[e.src||f(m).media?(l(),i("div",{key:0,class:n(["card-list-links__media-wrapper",`card-list-links__media-wrapper--${e.imageType}`])},[p(a.$slots,"media",{classes:["card-list-links__media"]},()=>[s("img",{class:"card-list-links__media",src:e.src,alt:e.alt??""},null,8,A)],!0)],2)):d("",!0),s("div",{class:n(["card-list-links__content",`card-list-links__content--${e.alignment}`])},[s("div",L,[e.headingUrl&&(e.heading||f(m).heading)?(l(),u(b,{key:0,"button-type":"text",size:"medium",component:e.linkComponent,href:e.headingUrl,"icon-right":e.headingUrl?"arrow-right":null,"text-alignment":e.alignment},{text:g(({classes:t})=>[p(a.$slots,"heading",{classes:t},()=>[s("h4",{class:n(t)},y(e.heading),3)],!0)]),_:3},8,["component","href","icon-right","text-alignment"])):e.heading||f(m).heading?p(a.$slots,"heading",{key:1},()=>[e.heading?(l(),i("h4",E,y(e.heading),1)):d("",!0)],!0):d("",!0),k.value.length>0?(l(),i("ul",{key:2,class:n(["card-list-links__list",{"card-list-links__list--divider":e.enableDivider}])},[(l(!0),i(S,null,B(k.value,(t,c)=>(l(),i("li",{key:c,class:"card-list-links__list-item"},[C(b,{"button-type":"text",size:"small",component:e.linkComponent,href:t.href,"icon-left":"chevron-right","text-alignment":e.alignment},{text:g(x=>[p(a.$slots,"listItemText",z({ref_for:!0},{...x,item:t}),()=>[s("p",{class:n([x.classes,"u-paragraph","u-bold"])},y(t.text),3)],!0)]),_:2},1032,["component","href","text-alignment"])]))),128))],2)):d("",!0)]),e.enableShowMoreButton&&e.items.length>4?(l(),u(b,{key:0,"button-type":"text",size:"small",component:"text","icon-right":r.value?"chevron-up":"chevron-down",class:"card-list-links__more-button","text-alignment":e.alignment,onClick:h[0]||(h[0]=t=>r.value=!r.value)},{text:g(({classes:t})=>[p(a.$slots,"showMoreButtonText",{classes:t},()=>[s("p",{class:n([t,"u-tiny-text","u-bold"])},y(r.value?"Show less":"Show more"),3)],!0)]),_:3},8,["icon-right","text-alignment"])):d("",!0)],2)],2)]))}},I=V(F,[["__scopeId","data-v-78ae08c9"]]),O={class:"list-links-container"},R={__name:"watson-organism-list-links",props:{items:{type:Array,default:()=>[]},enableBackground:{type:Boolean,default:!0},background:{type:String,default:null},enableDivider:{type:Boolean,default:!1},columnCount:{type:Number,default:3},typography:{type:Object,default:()=>({})}},setup(e){const r=e,m=v(()=>({"--column-count":r.columnCount||"initial"}));return(o,k)=>(l(),i("section",O,[s("div",{class:"list-links",style:T(m.value)},[(l(!0),i(S,null,B(e.items,(a,h)=>
1(l(),u(f(I),{key:h,"image-type":"fill",items:a.subitems,alignment:"left","enable-show-more-button":!1,"enable-background":e.enableBackground,"enable-divider":e.enableDivider,"background-color":e.background,class:"list-links__card","heading-url":a.href},U({heading:g(({classes:t})=>[a.title||a.href?(l(),u(_,{key:0,text:a.title?a.title:a.href,typography:e.typography.cardTitle,class:n(t)},null,8,["text","typography","class"])):d("",!0)]),listItemText:g(({classes:t,item:c})=>[c.href?(l(),u(N,{key:0,href:c.href,class:n(t)},{default:g(()=>[c.text?(l(),u(_,{key:0,text:c.text,typography:e.typography.listItem},null,8,["text","typography"])):d("",!0)]),_:2},1032,["href","class"])):(l(),u(_,{key:1,text:c.text,typography:e.typography.listItem,class:n(t)},null,8,["text","typography","class"]))]),_:2},[a.media?{name:"media",fn:g(({classes:t})=>[C(M,{content:a.media,class:n(t)},null,8,["content","class"])]),key:"0"}:void 0]),1032,["items","enable-background","enable-divider","background-color","heading-url"]))),128))],4)]))}};export{R as default}; 2//# sourceMappingURL=watson-organism-list-links-BermFgsi.js.map
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.