import{p as e,H as a,h as r,d as o,t}from"./p-Bpcl2TqF.js";import{i as d,d as i,t as c}from"./p-94ZtGp9D.js";const n=()=>`:host{display:inline-flex}.card{position:relative;display:inline-flex;flex-direction:column;word-wrap:break-word;background-color:#FFFFFF;background-clip:border-box;border:2px solid #EEEDED;border-radius:2px;width:350px;height:auto;font-family:var(--ifx-font-family)}.card:has(.card-href:focus),.card:has(.card-href:hover){outline:none;border-color:#0A8276}.card:has(.card-href:focus) ::slotted(ifx-card-headline),.card:has(.card-href:hover) ::slotted(ifx-card-headline){color:#0A8276}.card.noBtns .vertical .lower__body-wrapper{padding-bottom:24px}.card.noBtns .horizontal .lower__body-wrapper{padding-bottom:24px}.card .horizontal{display:flex;flex-direction:row;min-height:218px}.card .horizontal .card-img{flex:1;text-decoration:none}.card .horizontal .card-img.noImage{display:none}.card .horizontal .card-img ::slotted([slot=img]){width:100%;vertical-align:bottom}.card .horizontal .lower__body-wrapper{flex:1;display:grid;grid-template-rows:1fr auto}.card .horizontal .lower__body-wrapper .upper-body{display:flex;flex-direction:column;text-decoration:none;color:#1D1D1D;padding:24px 24px 0px 24px}.card .vertical .upper__body-wrapper{text-decoration:none;color:#1D1D1D}.card .vertical .upper__body-wrapper .card-img{height:190px}.card .vertical .upper__body-wrapper .card-img.noImage{display:none}.card .vertical .upper__body-wrapper .upper-body{padding:24px 24px 0px 24px}.card .vertical .lower__body-wrapper:hover{border-color:#EEEDED}.card.horizontal{flex-direction:row;width:538px}.card.horizontal .card-img{flex:1;order:2}.card.horizontal .card-img ::slotted([slot=img]){width:100%;height:100%;vertical-align:bottom;object-fit:cover}.card.horizontal.left .horizontal .card-img{order:1}.card.horizontal.left .horizontal .lower__body-wrapper{order:2}.card .card-href:focus{outline:none}`;const l=e(class e extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow()}get el(){return this}noBtns;direction="vertical";alignment;noImg;href="";internalHref="";target="_self";ariaLabel;setImgPosition(e){this.alignment=e.detail}handleComponentAdjustment(){const e=this.el.querySelector("ifx-card-image");const a=this.el.querySelector("ifx-card-links");this.noImg=!e;this.noBtns=!a;if(this.href.trim()===""){this.internalHref=undefined}else{this.internalHref=this.href}}componentWillLoad(){this.handleComponentAdjustment()}async componentDidLoad(){if(!d(this.el)){const e=i();c("ifx-card",await e)}}componentWillUpdate(){this.handleComponentAdjustment()}render(){return r(o,{key:"bc39e464f1baae707bbcf1f0c5bf46a6736850d8"},r("div",{key:"815797671f34136bad1720c80ca5b1fc34614a8b","aria-label":this.ariaLabel,class:`card \n            ${this.noBtns?"noBtns":""}\n            ${this.direction} \n            ${this.alignment}`,role:"group"},this.direction==="horizontal"&&r("div",{key:"29cb5772e0d455f9d44d91f203dde50f2b1f104f",class:"horizontal"},r("a",{key:"a0e62ce5e0ea6fb78219b69a458aad0bb4f788da",class:`card-img ${this.noImg?"noImage":""} ${this.internalHref?"card-href":""}`,href:this.internalHref},r("slot",{key:"900b7277c8b35b8e30592a61c607520b8fa6d923",name:"img"})),r("div",{key:"b91cb7a606b7bdab6ce41a3beb664e747bc23209",class:"lower__body-wrapper"},r("a",{key:"920ae268da088aa2d19c8f5f37e88b3778e4b049",class:`upper-body ${this.internalHref?"card-href":""}`,href:this.internalHref,id:"upper-body-content"},r("slot",{key:"4b289a4a0b1eb1ba1d5f35c92dd3ca6c88301428"})),r("div",{key:"472517824772b6b0ffb0dfebcd2e97ff9c5a142a"},r("slot",{key:"f2e36bf7eaad6d9f94a9bcba6c65513aff1b26d9",name:"buttons"})))),this.direction==="vertical"&&r("div",{key:"81afdc1c3e381668127d51401265254fcefa4d46",class:"vertical"},r("a",{key:"876869226dd985f89603d723ea029c84bb5d7a62",class:`upper__body-wrapper ${this.internalHref?"card-href":""}`,href:this.internalHref,target:this.target},r("div",{key:"bbe2947a3e960a5908e7f4dc0a375f35758b3535",class:`card-img ${this.noImg?"noImage":""}`},r("slot",{key:"1ebb22404fb5278a2d6bc047b9b6a20134591141",name:"img"})),r("div",{key:"54c23f72393d5a955c28baf7786b453504aa53f4",class:"upper-body",id:"upper-body-content"},r("slot",{key:"6fb57a25333757fd915c0b2857af67356fcbe02f"}))),r("div",{key:"c1aa5dcd8bae39230e0cc489a95dbb01213ec60e",class:"lower__body-wrapper",role:"group","aria-labelledby":"upper-body-content"},r("slot",{key:"7edeeb55da6d87f0fc4d02fec8b2842c13b96562",name:"buttons"})))))}static get style(){return n()}},[769,"ifx-card",{direction:[1],href:[1],target:[1],ariaLabel:[1,"aria-label"],noBtns:[32],alignment:[32],noImg:[32],internalHref:[32]},[[0,"imgPosition","setImgPosition"]]]);function s(){if(typeof customElements==="undefined"){return}const e=["ifx-card"];e.forEach((e=>{switch(e){case"ifx-card":if(!customElements.get(t(e))){customElements.define(t(e),l)}break}}))}const b=l;const f=s;export{b as IfxCard,f as defineCustomElement};
//# sourceMappingURL=ifx-card.js.map