import{p as e,H as a,h as r,d as o,t as d}from"./p-CHfEnK-2.js";import{i as t,d as i,t as c}from"./p-94ZtGp9D.js";const n=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get el(){return this}noBtns;direction="vertical";alignment;noImg;href="";internalHref="";target="_self";ariaLabelText;setImgPosition(e){this.alignment=e.detail}handleComponentAdjustment(){const e=this.el.querySelector("ifx-card-image"),a=this.el.querySelector("ifx-card-links");this.noImg=!e,this.noBtns=!a,this.internalHref=""===this.href.trim()?void 0:this.href}componentWillLoad(){this.handleComponentAdjustment()}async componentDidLoad(){if(!t(this.el)){const e=i();c("ifx-card",await e)}}componentWillUpdate(){this.handleComponentAdjustment()}render(){return r(o,{key:"287c7825bc85bd912363bf8fbba1943a5921b8da"},r("div",{key:"8b201581f1f8c22454a06db017fe391cf15584f9","aria-label":this.ariaLabelText,class:`card \n            ${this.noBtns?"noBtns":""}\n            ${this.direction} \n            ${this.alignment}`,role:"group"},"horizontal"===this.direction&&r("div",{key:"0ce06ed6a84d25a6b5e66730c293a165b6b98471",class:"horizontal"},r("a",{key:"87467383fe396ed66036d2531c7a6b261d64d683",class:`card-img ${this.noImg?"noImage":""} ${this.internalHref?"card-href":""}`,href:this.internalHref},r("slot",{key:"20bf5ddce543ff6c6bd45f81275c3f1d1b972b83",name:"img"})),r("div",{key:"ae70b486866c39597b5b1f29113a99074e5cec3e",class:"lower__body-wrapper"},r("a",{key:"591ad844101c4761df16747ff9517caa3dd5cffc",class:"upper-body "+(this.internalHref?"card-href":""),href:this.internalHref,id:"upper-body-content"},r("slot",{key:"877a3ae9e1e552fcd6df50e3a92c22a7fcafd016"})),r("div",{key:"7d0f7fc0c56e5a72e1b5d7d172d3a43f38fbe291"},r("slot",{key:"ade3b9567218a92bf48de6d5a1e7bf164f637949",name:"buttons"})))),"vertical"===this.direction&&r("div",{key:"ac76ceee673d8037e7d3134cfe03c60dd11df876",class:"vertical"},r("a",{key:"8eb41549bcf01963df0593a949808f28ec7c46ef",class:"upper__body-wrapper "+(this.internalHref?"card-href":""),href:this.internalHref,target:this.target},r("div",{key:"dbf65b6919d28a900d2e43dac93b1875cc0fa89b",class:"card-img "+(this.noImg?"noImage":"")},r("slot",{key:"1732763e7c36478ebbda74919dc75ad05c052a7a",name:"img"})),r("div",{key:"13ae88e5f45b2ecbde57f03a63e6a760851c4eca",class:"upper-body",id:"upper-body-content"},r("slot",{key:"e7fb8ee2a6f6871572fa14b5a993060ace5f0569"}))),r("div",{key:"07f3c65b714d1dcd70990df94216fd390c7fea6e",class:"lower__body-wrapper",role:"group","aria-labelledby":"upper-body-content"},r("slot",{key:"69a7e7953158799d39ac17dc39c77b7efe9e89a1",name:"buttons"})))))}static get style(){return":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}"}},[769,"ifx-card",{direction:[1],href:[1],target:[1],ariaLabelText:[1,"aria-label-text"],noBtns:[32],alignment:[32],noImg:[32],internalHref:[32]},[[0,"imgPosition","setImgPosition"]]]),l=n,s=function(){"undefined"!=typeof customElements&&["ifx-card"].forEach((e=>{"ifx-card"===e&&(customElements.get(d(e))||customElements.define(d(e),n))}))};export{l as IfxCard,s as defineCustomElement}