import{r as e,h as t,H as o,g as i}from"./p-C1erT8T2.js";import{A as a,l as r}from"./p-CcnD3LWl.js";import{V as s}from"./p-CyvDgtoV.js";import"./p-BFTU3MAI.js";const c='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-text-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:34px;padding:0 9px;outline:none}verdocs-text-input .input-element:disabled{cursor:not-allowed;background:#aeb4bf;border:1px solid #33364b}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input .required{color:red;margin-left:2px;display:inline-block}verdocs-text-input [data-lastpass-icon-root]{display:none !important}verdocs-text-input .input-container{position:relative}verdocs-text-input .clear{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .clear:hover{fill:#720101;cursor:pointer}verdocs-text-input .copy{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .copy:hover{fill:#654dcb;cursor:pointer}verdocs-text-input .toggle-pw{top:5px;right:7px;width:18px;height:18px;stroke:#cccccc;position:absolute}verdocs-text-input .toggle-pw:hover{fill:#654dcb;cursor:pointer}verdocs-text-input.clearable .input-element,verdocs-text-input.copyable .input-element{padding-right:32px}';const n=class{constructor(t){e(this,t);this.picker=null;this.value="";this.label="";this.placeholder="";this.helpText="";this.disabled=false;this.required=false;this.showingPw=false;this.focused=false;this.containerId=`verdocs-date-input-${Math.random().toString(36).substring(2,11)}`}async focusField(){var e;this.focused=true;(e=this.picker)===null||e===void 0?void 0:e.show();setTimeout((()=>{this.focused=false}),500)}componentDidLoad(){this.picker=new a(`#${this.containerId}`,{locale:r,isMobile:true,autoClose:true,onShow:()=>this.focused=true,onHide:()=>this.focused=false,onSelect:({date:e,formattedDate:t})=>{const o=new CustomEvent("input",{detail:{date:e,formattedDate:t}});this.hostEl.dispatchEvent(o)}})}copyToClipboard(){this.inputEl.select();navigator.clipboard.writeText(this.value).then((()=>s("Copied!"))).catch((e=>console.log("Error copying to clipboard",e)))}render(){return t(o,{key:"cc88f2d255889798b44d1b4a378df4825dad2864",class:`input-field`},t("label",{key:"54efdeecf84a03dbb649ecc2eec048bc54cc76a1"},this.label&&t("div",{key:"9d276e51d188ed7b80b987b3e91ab5afc040bfb5",class:"input-label"},this.label+":",this.required&&t("span",{key:"66f64bfe62f167af288bf7ae6df0c97d872425ce",class:"required"},"*")),t("div",{key:"57ec4d6abb6738e8c6aaf71c80c5657ca6597fcc",class:"input-container"},t("input",{key:"9e1a8b80b378a273a244ff17ef0ede94688f27bf",type:"text",value:this.value,required:this.required,class:"input-element","data-lpignore":"true",id:this.containerId,disabled:this.disabled,placeholder:this.placeholder,ref:e=>this.inputEl=e,onInput:e=>this.value=e.target.value})),this.helpText&&t("verdocs-help-icon",{key:"7b7468b7db8c613c31c52fa21cfcd824b84afbd6",text:this.helpText})))}get hostEl(){return i(this)}};n.style=c;export{n as verdocs_date_input};
//# sourceMappingURL=p-6f203ad5.entry.js.map