import{r as e,h as s}from"./p-0d5a2e05.js";import{g as t}from"./p-97e3e910.js";const i=class{constructor(s){e(this,s);this.helperText="";this.error=false}render(){var e;return s("div",{key:"3027091d08930ba6a5c9b1c6339ee6a07973288d",class:`dga-helper-text ${this.error?"dga-helper-text--error":""}`},s("span",{key:"b8009e673984f1b8fd2d960ed15ca274d0cb31ba",class:"dga-helper-text__icon"},this.helperTextIcon&&((e=this.helperTextIcon)===null||e===void 0?void 0:e.name)&&s("dga-icon",{key:"51d329ecf87d97d2c6676253316fba7969ad7c87",icon:this.helperTextIcon.name,variant:this.helperTextIcon.variant,type:this.helperTextIcon.type,size:16})),s("span",{key:"c3099672ca5b679e0b3f83a645d804d8e47de975",class:"dga-helper-text__desc"},this.helperText))}};const a=class{constructor(s){e(this,s);this.label="";this.variant="default";this.size="md";this.disabled=false;this.required=false}render(){return s("label",{key:"35cd780b901fca5fe50de1cd81ca1d44a2d2914c",class:`dga-label dga-label--${this.size} ${this.disabled?"disabled":""}`},this.required&&s("span",{key:"5a35be9ee548d6a204c4e636d7198c2e0d41293d",class:"star"},"*"),this.label)}};const c={success:s("dga-icon",{icon:"CheckmarkCircle02Icon",variant:"solid"}),error:s("dga-icon",{icon:"AlertCircleIcon",variant:"solid"}),warning:s("dga-icon",{icon:"Alert02Icon",variant:"solid"})};const d=class{constructor(s){e(this,s);this.size="lg";this.type="text";this.variant="default";this.error=false;this.feedbackIcon=false;this.feedbackIconType="success";this.feedbackIconRing=false;this.helperText="";this.disabled=false;this.readonly=false;this.required=false;this.name=t();this.value="";this.isActive=false;this.isFocused=false}render(){return s("div",{key:"19f0b99b9f435a38edd22905a3db29d8aff57cb6",class:"dga-form-control"},this.label&&s("dga-label",{key:"7e6a15e17be30c0f9a018a692bc6c992ab97e135",label:this.label,size:this.size,required:this.required,disabled:this.disabled}),s("div",{key:"0fa51c9f567dc1f842c35e4e1cfcc53006d91cd4",class:`input input--${this.size} ${this.error?"input--error":""} ${this.variant!=="default"?`input--${this.variant}`:""} ${this.isActive?"active":""} ${this.isFocused?"focus":""} ${this.disabled?"input--disabled":""} ${this.readonly?"readOnly":""}`,ref:e=>this.inputContainerRef=e},s("slot",{key:"a7074b723ada5e6baa0a2ee67bd74112ef25198b",name:"prefix"}),this.icon&&s("span",{key:"19f471c8ef43a45db98bc376a71d44223c8bf62b",class:"input__icon"},s("dga-icon",{key:"8553ea7464f912dccbf27cbc44de3ccf53be559b",icon:this.icon.name,variant:this.icon.variant,type:this.icon.type,size:20})),s("input",{key:"1b485d4d06d91fad904aaa87a982051d3549589c",value:this.value,name:this.name,type:this.type,onFocus:()=>this.isFocused=true,onBlur:e=>{this.isFocused=false;this.onBlur(e)},class:"input__field",placeholder:this.placeholder,disabled:this.disabled,readOnly:this.readonly,required:this.required,onMouseDown:()=>this.isActive=true,onMouseUp:()=>this.isActive=false,onMouseOut:()=>this.isActive=false,onChange:this.onChange,onInput:this.onInput}),this.error?s("span",{class:`input__feedback-icon input__feedback-icon--error ${this.feedbackIconRing?"input__feedback-icon--ring":""}`}):this.feedbackIcon?s("span",{class:`input__feedback-icon input__feedback-icon--${this.feedbackIconType} ${this.feedbackIconRing?"input__feedback-icon--ring":""}`},c[this.feedbackIconType]):null,s("slot",{key:"a7428ebd28be904b9f9386cf58a8b54ee45836f2",name:"suffix"})," "),this.helperText&&s("dga-helper-text",{key:"3aabb5c06f1fb0ef3c58494197ab2c625a6c6aaa",helperText:this.helperText,helperTextIcon:this.helperTextIcon,error:this.error}))}};export{i as dga_helper_text,a as dga_label,d as dga_text_input};
//# sourceMappingURL=p-09c31426.entry.js.map