import{proxyCustomElement,HTMLElement,h,Host,Fragment}from"@stencil/core/internal/client";import{g as getHeaderLevel}from"./utils.js";import"./contacts.js";import{d as defineCustomElement$5}from"./va-card2.js";import{d as defineCustomElement$4}from"./va-icon2.js";import{d as defineCustomElement$3}from"./va-link-action2.js";import{d as defineCustomElement$2}from"./va-tag-status2.js";import{i as instance}from"./i18next.js";const vaCardStatusCss='.sr-only{border:0;clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute !important;width:1px;word-wrap:normal !important}.hint-text{color:#71767A;display:block;font-size:1.06rem}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-sr-only{position:absolute;left:-999em;right:auto}:host .va-card-status__header{margin:var(--units-1) 0 var(--units-1) 0;font-size:var(--font-size-h3)}:host .va-card-status__header .va-card-status_card-title{font-family:var(--font-serif);font-weight:var(--font-weight-bold)}:host .va-card-status__tag{display:block}:host .va-card-status__subheader{margin-top:var(--units-1);margin-bottom:var(--units-2);font-size:var(--font-size-h4);font-family:var(--font-sans-serif)}:host([error]:not([error=""])) .va-card-status__wrapper{border-left:var(--units-0p5) solid var(--vads-color-secondary-dark);padding-left:var(--units-2);position:relative}:host([error]:not([error=""])) .va-card-status__wrapper va-card{border-width:var(--units-0p5);border-color:var(--vads-color-secondary-dark)}:host([error]:not([error=""])) .va-card-status__wrapper .required{font-weight:var(--font-weight-bold)}.required{color:var(--vads-color-secondary-dark);margin-left:var(--units-0p5);font-size:initial;font-weight:initial}',VaCardStatusStyle0=vaCardStatusCss,VaCard=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.headerLevel=3,this.headerText=void 0,this.subheaderText=void 0,this.required=!1,this.tagStatus="info",this.tagText=void 0,this.error=void 0,this.linkHref=void 0,this.linkText=void 0}render(){const{headerLevel:t,headerText:e,subheaderText:a,tagStatus:r,tagText:s,error:o,linkHref:n,linkText:i,required:d}=this;if(!e||!n||!i)return null;const l=getHeaderLevel(t),u=getHeaderLevel(t+1),c=d&&h("span",{class:"required"}," ",instance.t("required"));return h(Host,null,h("div",{class:"va-card-status__wrapper"},h("va-card",null,h("header",null,h(l,{class:"va-card-status__header"},h("span",{class:"usa-sr-only"},s," ",e," ",d&&"required"," ",a),h("span",{"aria-hidden":"true"},s&&h("div",null,h("va-tag-status",{status:r,text:s})),h("span",{class:"va-card-status_card-title"},e),c)),a&&h(u,{"aria-hidden":"true",class:"va-card-status__subheader"},a)),h("span",{id:"card-status-error-message",role:"alert"},o&&h(Fragment,null,h("span",{class:"usa-sr-only"},instance.t("error")),h("span",{class:"usa-error-message"},o))),h("slot",null),h("va-link-action",{messageAriaDescribedby:o?`${instance.t("error")}: ${o}`:null,type:"secondary",href:n,text:i}))))}static get style(){return VaCardStatusStyle0}},[1,"va-card-status",{headerLevel:[2,"header-level"],headerText:[1,"header-text"],subheaderText:[1,"subheader-text"],required:[4],tagStatus:[1537,"tag-status"],tagText:[1,"tag-text"],error:[1537],linkHref:[1,"link-href"],linkText:[1,"link-text"]}]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-card-status","va-card","va-icon","va-link-action","va-tag-status"].forEach(t=>{switch(t){case"va-card-status":customElements.get(t)||customElements.define(t,VaCard);break;case"va-card":customElements.get(t)||defineCustomElement$5();break;case"va-icon":customElements.get(t)||defineCustomElement$4();break;case"va-link-action":customElements.get(t)||defineCustomElement$3();break;case"va-tag-status":customElements.get(t)||defineCustomElement$2()}})}const VaCardStatus=VaCard,defineCustomElement=defineCustomElement$1;export{VaCardStatus,defineCustomElement};