import{parseFragment as t,registerTemplate as s,freezeTemplate as e,registerDecorators as o,registerComponent as n,KingdeeElement as i}from"@kdcloudjs/kwc";import l from"./icon.js";import{b as c}from"../label-CY8Q8HAO.js";const d=t`<span class="kdds-assistive-text${0}"${2}>${"t1"}</span>`,a={"kdds-button":!0,"kdds-button_icon":!0,"kdds-cell-edit__button":!0,"kdds-m-left_x-small":!0},r={classMap:{"kdds-button__icon":!0,"kdds-button__icon_hint":!0,"kdds-button__icon_lock":!0,"kdds-button__icon_small":!0,"kdds-button__icon_edit":!0},props:{iconName:"kdfont-bianji",size:"xx-small"},key:1};function u(t,s,e,o){const{ti:n,c:i,d:c,sp:u,st:h,h:b}=t;return[b("button",{classMap:a,attrs:{tabindex:n(s.tabIndex)},ref:"button",key:0},[i("kd-icon",l,r),h(d,3,[u(1,null,c(s.assistiveText))])])]}var h=s(u);u.hasRefs=!0,u.stylesheets=[],u.stylesheetToken="kwc-cr2fbr9dqd",u.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveCellEditableButton-undefined_primitiveCellEditableButton",e(u);const b=c.edit,m=c.editHasError;class k extends i{constructor(...t){super(...t),this.columnLabel=void 0,this.hasError=void 0,this._htmlButton=null}focus(){this.htmlButton&&this.htmlButton.focus()}click(){this.htmlButton&&this.htmlButton.click()}get tabIndex(){return this.getAttribute("tabindex")}set tabIndex(t){this.setAttribute("tabindex",t)}get htmlButton(){return this._htmlButton||(this._htmlButton=this.refs.button),this._htmlButton}disconnectedCallback(){this._htmlButton=null}get assistiveText(){const t=this.hasError?` ${m}`:"";return`${b} ${this.columnLabel}${t}`}}o(k,{publicProps:{columnLabel:{config:0},hasError:{config:0},tabIndex:{config:3}},publicMethods:["focus","click"],fields:["_htmlButton"]});const _=n(k,{tmpl:h,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveCellEditableButton-",apiVersion:63});export{_ as default};
