import{registerTemplate as e,freezeTemplate as l,registerDecorators as o,registerComponent as s}from"@kdcloudjs/kwc";import t from"./icon.js";import"../observable-tloG64m6.js";import"../i18n-B98kiI7M.js";import{v as a}from"../utilsPrivate-CI3EeA5x.js";import{_ as d}from"../primitiveDatatableCell-Dnc4fXBk.js";import"../empty_html-CjXB8rB4.js";import"../client-Ddi3i8XR.js";import"../ssr-C2pjZzfv.js";import"./iso8601Utils.js";import"../colorValid-qIPgkqGp.js";import"./shadowBaseClassPrivate.js";var n=[function(e,l,o){var s=e?"["+e+"]":"",t=e?"["+e+"-host]":"";return(l?":host .kdds-table-cell-expand":t+" .kdds-table-cell-expand")+s+" {display: flex;align-items: center;justify-content: center;}"+(l?":host .kdds-table-cell-expand":t+" .kdds-table-cell-expand")+s+" .kdds-table-cell-row-expand-icon"+s+" {cursor: pointer;display: flex;color: var(--kdds-c-datatable-icon-color-default);}"+(l?":host .kdds-table-cell-expand":t+" .kdds-table-cell-expand")+s+" .kdds-table-cell-row-expand-icon:hover"+s+" {color: var(--kdds-c-datatable-icon-color-hover);transition: color 0.1s linear;}"}];const i={"kdds-table-cell-row-expand-icon":!0};function c(e,l,o,s){const{ncls:a,b:d,c:n,h:c}=e,{_m0:r}=s;return[c("div",{className:a(l.computedCellClass),key:0},[n("kd-icon",t,{classMap:i,props:{iconName:l.iconName},key:1,on:r||(s._m0={click:d(l.handleIconClick)})})])]}var r=e(c);c.stylesheets=[],c.stylesheetToken="kwc-38j9l76cp2g",c.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveCellExpand-undefined_primitiveCellExpand",n&&c.stylesheets.push.apply(c.stylesheets,n),l(c);class p extends d{constructor(...e){super(...e),this.rowExpanded=void 0,this.rowKeyValue=void 0,this.colKeyValue=void 0}get computedCellClass(){return a({"kdds-table-cell-expand":!0,"kdds-table-cell-expand-expanded":this.rowExpanded})}get iconName(){return this.rowExpanded?"kdfont-shouqi":"kdfont-unfolded-s"}handleIconClick(){const e=new CustomEvent("privaterowexpand",{bubbles:!0,composed:!0,cancelable:!0,detail:{rowKeyValue:this.rowKeyValue,colKeyValue:this.colKeyValue,nextState:!this.rowExpanded}});this.dispatchEvent(e)}}o(p,{publicProps:{rowExpanded:{config:0},rowKeyValue:{config:0},colKeyValue:{config:0}}});const m=s(p,{tmpl:r,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveCellExpand-",apiVersion:63});export{m as default};
