import{r as e,c as o,h as r,H as s}from"./p-6vpKbd31.js";import{VerdocsEndpoint as c}from"@verdocs/js-sdk";import{u as l}from"./p-7LXbcjVz.js";const d='@-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-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}';const a=class{constructor(r){e(this,r);this.fileSelected=o(this,"fileSelected");this.endpoint=c.getDefault()}handleFileChanged(e){var o,r;this.file=((o=e.target.files)===null||o===void 0?void 0:o[0])||null;(r=this.fileSelected)===null||r===void 0?void 0:r.emit({file:this.file});console.debug("[CHOOSER] Selected file",this.file)}handleSelectFile(e){var o,r;e.stopPropagation();this.file=null;(o=this.fileSelected)===null||o===void 0?void 0:o.emit({file:null});(r=document.getElementById("verdocs-file-chooser"))===null||r===void 0?void 0:r.click()}render(){const e=this.file?"Select a different file":"Select a file from your computer";return r(s,{key:"d2388c9f8fa3aa1de54d359698fd8b9b7a2dd39a"},r("input",{key:"d848ef1b6f60d6e57d7c4939dc44c8ed320e97b3",type:"file",multiple:true,id:"verdocs-file-chooser",accept:"application/pdf,.pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),r("div",{key:"d94e8fbc7b94f460fdbc51cf055a17fce83a2673",class:"upload-box"},r("div",{key:"02dcf9d0f6c6f687eee3598c06e44b31de34b5c7",class:"selected-filename"},this.file?this.file.name:"Drag a file here"),r("div",{key:"d8c20dddc52d531c6d05078f7c76d2a6924d78e0",class:"or-prefer"},this.file?l:"Or, if you prefer..."),r("verdocs-button",{key:"5d65da28787d44f563ce72685e5458bb1322973d",label:e,size:"small",onClick:e=>this.handleSelectFile(e)})))}};a.style=d;const i='@-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-progress-bar{font-family:"Inter", "Barlow", sans-serif;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-progress-bar .labels{display:-ms-flexbox;display:flex;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-progress-bar .labels .label{display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin-right:8px;color:#33364b}verdocs-progress-bar .bar{display:-ms-flexbox;display:flex;-ms-flex:0 0 10px;flex:0 0 10px;border-radius:5px;background-color:#cccccc}verdocs-progress-bar .bar .slider{display:-ms-flexbox;display:flex;border-radius:5px;background-color:#55bc81}';const t=class{constructor(o){e(this,o);this.label="";this.showPercent=false;this.percent=0}render(){const e=Math.ceil(100*Math.min(this.percent,100)/100);console.log("Rendering progress bar",{widthPercent:e,label:this.label,showPercent:this.showPercent,percent:this.percent});return r(s,{key:"cfccbd59016954d10782723bae6eb451ac8e3e30"},r("div",{key:"a0981e9257e56f6c1e207cda99c637bbff85227f",class:"labels"},this.label&&r("div",{key:"5d692917d2a9b0baf1802573e783fdae4efcc35b",class:"label"},this.label),this.showPercent&&r("div",{key:"14a507c2bc3a7474f1d9933fd87b52b8695a52a4",class:"label"},this.percent,"%")),r("div",{key:"187e0efa73554e681d71bb1d26283e3ab226ca59",class:"bar"},r("div",{key:"1ec5e3c55c52b0d88cc5da1cec57a24918d8e735",class:"slider",style:{width:`${e}%`}})))}};t.style=i;export{a as verdocs_file_chooser,t as verdocs_progress_bar};
//# sourceMappingURL=p-88b73a01.entry.js.map