import{r as i,h as t,H as e,g as l}from"./p-afb110dc.js";const s=class{constructor(t){i(this,t),this.label="",this.required=!1,this.expanded=!1,this.disabled=!1,this.validationMessage="",this.iconRight="",this.iconLeft="",this.inverted=!1,this.loading=!1}get buildIconLeftTemplate(){return this.iconLeft?t("bal-icon",{name:this.iconLeft,isLeft:!0,size:"medium"}):""}get buildIconRightTemplate(){return this.iconRight?t("bal-icon",{name:this.iconRight,isRight:!0,size:"medium"}):""}render(){return t(e,{class:{"is-expanded":this.expanded}},t("div",{class:{form:!0,"is-inverted":this.inverted,"is-disabled":this.disabled}},t("label",{class:"label",htmlFor:this.findInputId()},this.label,!0===this.required?" *":"",t("slot",{name:"hint"})),t("div",{class:{control:!0,"has-icons-left":!!this.iconLeft,"has-icons-right":!!this.iconRight,"is-loading":this.loading}},t("slot",null),this.buildIconLeftTemplate,this.buildIconRightTemplate),t("p",{class:"help is-danger"},this.validationMessage)))}findInputId(){const i=this.element.querySelector("input.input");return i&&i.id?i.id:""}get element(){return l(this)}};s.style="@-webkit-keyframes spinAround{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinAround{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.icon.sc-bal-field{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;height:1.5rem;width:1.5rem}.icon.is-small.sc-bal-field{height:1rem;width:1rem}.icon.is-medium.sc-bal-field{height:2rem;width:2rem}.icon.is-large.sc-bal-field{height:3rem;width:3rem}.sc-bal-field-h{display:inline-block;position:relative}.is-expanded.sc-bal-field-h{display:block}.control.is-loading.sc-bal-field::after,.select.is-loading.sc-bal-field::after{border-top-color:#003399 !important;border-right-color:#003399 !important;border-left-color:transparent !important;border-bottom-color:transparent !important}.form.is-inverted.sc-bal-field .control.is-loading.sc-bal-field::after,.form.is-inverted.sc-bal-field .select.is-loading.sc-bal-field::after{border-top-color:#ffffff !important;border-right-color:#ffffff !important}.form.sc-bal-field>.label.sc-bal-field{font-size:0.9375rem !important;margin-bottom:0 !important;font-family:MetaPro, Arial, sans-serif}p.help.sc-bal-field{min-height:22.5px;margin-top:0 !important;margin-bottom:0 !important;font-family:MetaPro, Arial, sans-serif}.control.has-icons-left.sc-bal-field *.sc-bal-field::part(input){padding-left:38px}.control.sc-bal-field bal-icon.sc-bal-field{display:block}.form.sc-bal-field p.help.sc-bal-field{text-align:left}.form.is-expanded.sc-bal-field{width:100%}.form.is-disabled.sc-bal-field .label.sc-bal-field,.form.is-disabled.sc-bal-field .control.sc-bal-field{opacity:0.6}.form.is-inverted.sc-bal-field .label.sc-bal-field{color:#ffffff}.form.is-inverted.sc-bal-field p.help.sc-bal-field:not(.is-danger){color:#99add6}";export{s as bal_field}