import{r as t,h as i,H as s,g as e}from"./p-2b0a6102.js";import{g as h,a as n}from"./p-8df57f83.js";import"./p-14616bce.js";const r="bs-textarea-field{display:block;width:100%}";const d=class{constructor(i){t(this,i);this.attrs={};this.charMax=undefined;this.disabled=false;this.error=undefined;this.errorMsg=undefined;this.hint=undefined;this.hints=undefined;this.inputId=undefined;this.label=undefined;this.placeholder=undefined;this.required=undefined;this.rows=6;this.value="";this.passAttrs="";this.hintId=null}get charCount(){var t;return((t=this.value)===null||t===void 0?void 0:t.length)||0}get hintMsg(){return this.errorMsg||this.hint||this.hintDeprecated||undefined}get hintDeprecated(){var t,i;return((i=(t=this.hints)===null||t===void 0?void 0:t.join)===null||i===void 0?void 0:i.call(t,"\n"))||this.hints}get inputIdAttr(){return this.inputId||this.inputIdGen}componentWillLoad(){this.inputIdGen=this.inputId||h();this.hintId=this.hintMsg?h():null;this.attrs=n(this.hostEl,["autocomplete","cols","maxlength","minlength","name",...this.passAttrs.split(",")])}render(){return i(s,null,this.label&&i("bs-label",{for:this.inputIdAttr,disabled:this.disabled,required:this.required},this.label),i("bs-textarea",Object.assign({disabled:this.disabled,error:this.error,"hint-id":this.hintId,"input-id":this.inputIdAttr,"pass-attrs":this.passAttrs,placeholder:this.placeholder,required:this.required,rows:this.rows,value:this.value},this.attrs)),(this.hintMsg||this.charMax)&&i("bs-field-details",{"char-count":this.charCount,"char-max":this.charMax,error:this.error,"error-msg":this.errorMsg,hint:this.hint||this.hintDeprecated,"hint-id":this.hintId}))}get hostEl(){return e(this)}};d.style=r;export{d as bs_textarea_field};
//# sourceMappingURL=p-0db9bf58.entry.js.map