1import{W as v}from"./CJ_bmdys.js";import{_ as p}from"./DG4YWzmg.js";import{_ as B}from"./r55YrvmA.js";import{_ as c}from"./CILQMX2e.js";import{_ as C}from"./HesWnM5b.js";import{as as I,cZ as D,bR as t,ak as n,ah as y,cn as h,ai as u,aj as r,ct as s,bz as S,c5 as d,g,c4 as $,ap as L,dg as N,ao as R,ae as w}from"./C9Z41gEb.js";const T=["aria-busy","data-test"],x={class:"px-3"},A={class:"ws-search-result-base__title text-subtitle-2 text-base-color2 pb-2","data-test":"search-result-base-title"},V={key:0,class:"ws-pill mx-1 font-weight-regular"},F=["data-test"],z={key:0,class:"ws-pill mx-1 font-weight-regular"},H=I({__name:"search-result-base",props:{buttonLink:{default:void 0},emptyResultsContent:{default:void 0},fallbackImage:{default:void 0},itemPageName:{default:void 0},separateItems:{type:Boolean,default:!0},showBottomDivider:{type:Boolean,default:!1},showInlineDivider:{type:Boolean,default:!1},hideTotal:{type:Boolean,default:!1},skeletons:{},skeletonType:{},type:{}},emits:["close"],setup(e){const f=e,k=D(),l=w(()=>k.getData(f.type)),m=w(()=>k.isLoading(f.type));return(a,i)=>(t(),n("div",{class:"ws-search-result-base pt-6","aria-atomic":"true","aria-busy":s(m),"data-test":`search-result-base-${e.type}`},[y("div",x,[y("h5",A,h(a.$t(`search.parts.${e.type}.headline`)),1),e.showInlineDivider?(t(),u(c,{key:0,light:""})):r("",!0),s(m)?(t(),n("div",{key:1,class:S({"d-flex":!e.separateItems})},[d(a.$slots,"skeleton",{},()=>[(t(!0),n(g,null,$(e.skeletons,o=>(t(),u(p,{key:`skeleton-${e.type}-${o}`,class:"ma-1",type:e.skeletonType},null,8,["type"]))),128))])],2)):Array.isArray(s(l).results)&&s(l).results.length?(t(),n(g,{key:2},[d(a.$slots,"data",{data:s(l)},()=>[(t(!0),n(g,null,$(s(l).results,(o,b)=>(t(),n(g,null,[d(a.$slots,"item",{item:o},()=>[L(v,{"fallback-image":e.fallbackImage,images:o.images,"meta-description":o.metaDescription,slug:e.type!=="content"?{name:e.itemPageName,params:{slug:o.urlSlug}}:`/${o.urlSlug}`,title:o.title,onClose:i[0]||(i[0]=P=>a.$emit("close"))},null,8,["fallback-image","images","meta-description","slug","title"])]),e.showInlineDivider&&e.separateItems&&b+1<s(l).results.length?(t(),u(c,{key:`divider-${b}`,class:"my-1 ml-3",light:""})):r("",!0)],64))),256))]),e.showInlineDivider?(t(),u(c,{key:0,light:"",class:"mt-2"})):r("",!0),e.buttonLink?(t(),u(C,{key:1,class:"ws-search-result-base__goto d-flex my-3 ml-2 text-body-2 font-weight-bold",variant:"tertiary","data-test":`search-result-base-goto-${e.type}`,to:e.buttonLink,onClick:i[1]||(i[1]=o=>a.$emit("close"))},{default:N(()=>[d(a.$slots,"url",{},()=>[R(h(a.$t(`search.parts.${e.type}.goto`)),1)]),!s(m)&&!e.hideTotal&&s(l).total?(t(),n("span",V,h(s(l).total),1)):r("",!0),i[2]||(i[2]=y("span",{class:"ws-icon ws-icon--small notranslate","aria-hidden":"true"}," chevron_right ",-1))]),_:3},8,["data-test","to"])):a.$slots.url?(t(),n("div",{key:2,class:"ws-search-result-base__goto ws-btn ws-btn--tertiary d-flex my-3 ml-2 text-body-2 font-weight-bold","data-test":`search-result-base-goto-${e.type}`},[d(a.$slots,"url"),!s(m)&&!e.hideTotal&&s(l).total?(t(),n("span",z,h(s(l).total),1)):r("",!0),i[3]||(i[3]=y("span",{class:"ws-icon ws-icon--small notranslate","aria-hidden":"true"}," chevron_right ",-1))],8,F)):r("",!0)],64)):Array.isArray(e.emptyResultsContent)&&e.emptyResultsContent.length?(t(),u(B,{key:3,class:"px-3",content:e.emptyResultsContent},null,8,["content"])):r("",!0)]),e.showBottomDivider?(t(),u(c,{key:0,light:"",class:"mt-4"})):r("",!0)],8,T))}});export{H as _};
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.