"use strict";var e=require("@kdcloudjs/kwc"),s=require("./shadowBaseClassPrivate.js"),t=require("../ssr-RXknEJpO.js");require("../observable-BXDJFaLN.js"),require("../i18n-CP31jeWH.js");var i=require("../utilsPrivate-DL4VBetH.js");require("../client-Co_j5m_k.js"),require("../empty_html-hFq4zm9t.js"),require("./iso8601Utils.js"),require("../colorValid-BBnkvgd_.js");var r=[function(e,s,t){return"slot"+(e?"["+e+"]":"")+" {display: inline-block;}"}];const l={key:0},a=[];function o(e,s,t,i){const{s:r}=e;return[r("",l,a,t)]}var n=e.registerTemplate(o);o.slots=[""],o.stylesheets=[],o.stylesheetToken="kwc-6pr764mu7ia",o.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveFileDroppableZone-undefined_primitiveFileDroppableZone",r&&o.stylesheets.push.apply(o.stylesheets,r),e.freezeTemplate(o);class d extends s{get disabled(){return this._disabled||!1}set disabled(e){this._disabled=i.normalizeBoolean(e)}get multiple(){return this._multiple||!1}set multiple(e){this._multiple=i.normalizeBoolean(e)}constructor(){super(),this._disabled=void 0,this._multiple=void 0,t.isCSR&&(this.template.addEventListener("dragover",this.allowDrop.bind(this)),this.template.addEventListener("dragleave",this.handleDragLeave.bind(this)),this.template.addEventListener("drop",this.handleOnDrop.bind(this)))}connectedCallback(){this.classList.add("kdds-file-selector__dropzone")}setDragOver(e){this.classList.toggle("kdds-has-drag-over",e)}handleDragLeave(){this.setDragOver(!1)}handleOnDrop(e){e.preventDefault(),this.setDragOver(!1),this.disabled?e.stopPropagation():this.meetsMultipleCriteria(e)||e.stopPropagation()}allowDrop(e){e.preventDefault(),this.disabled||this.setDragOver(!0)}meetsMultipleCriteria(e){const{files:s}=e.dataTransfer;return!(s.length>1&&!this.multiple)}}d.validationOptOut=["class"],e.registerDecorators(d,{publicProps:{disabled:{config:3},multiple:{config:3}},track:{_disabled:1,_multiple:1}});const p=e.registerComponent(d,{tmpl:n,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveFileDroppableZone-",apiVersion:63});module.exports=p;
