import{registerTemplate as s,freezeTemplate as t,registerDecorators as l,registerComponent as i}from"@kdcloudjs/kwc";import{s as e}from"../kddsCommon-CucK_w70.js";import{s as a}from"../kddsUtilsGrid-CoXx1Bwj.js";import o from"./shadowBaseClassPrivate.js";import"../observable-tloG64m6.js";import"../i18n-B98kiI7M.js";import{n as d,d as r}from"../utilsPrivate-CI3EeA5x.js";import{c as n}from"../classSet-DY6Qvt6E.js";import"../client-Ddi3i8XR.js";import"../ssr-C2pjZzfv.js";import"../empty_html-CjXB8rB4.js";import"./iso8601Utils.js";import"../colorValid-qIPgkqGp.js";var c=[[function(s,t,l){return"@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {.kdds-slot"+(s?"["+s+"]":"")+" {display: flex;}}"}],[e,a]];const u={classMap:{"kdds-slot":!0},key:0},p=[];function g(s,t,l,i){const{s:e}=s;return[e("",u,p,l)]}var h=s(g);g.slots=[""],g.stylesheets=[],g.stylesheetToken="kwc-5g0js0f6hrv",g.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\layout-undefined_layout",c&&g.stylesheets.push.apply(g.stylesheets,c),t(g);const m={center:"kdds-grid_align-center",space:"kdds-grid_align-space",spread:"kdds-grid_align-spread",end:"kdds-grid_align-end"},k={start:"kdds-grid_vertical-align-start",center:"kdds-grid_vertical-align-center",end:"kdds-grid_vertical-align-end",stretch:"kdds-grid_vertical-stretch"},_={small:"kdds-grid_pull-padded",medium:"kdds-grid_pull-padded-medium",large:"kdds-grid_pull-padded-large"},y=Object.keys(k),v=Object.keys(_),f=Object.keys(m);function w(s,t,l){return s=s?s.toLowerCase():" ",d(s,{fallbackValue:" ",validValues:t||[]})}class j extends o{constructor(...s){super(...s),this._horizontalAlign=void 0,this._verticalAlign=void 0,this._pullToBoundary=void 0,this._multipleRows=void 0,this._layoutClass=[]}get horizontalAlign(){return this._horizontalAlign}set horizontalAlign(s){this._horizontalAlign=w(s,f),this.updateClassList()}get verticalAlign(){return this._verticalAlign}set verticalAlign(s){this._verticalAlign=w(s,y),this.updateClassList()}get pullToBoundary(){return this._pullToBoundary}set pullToBoundary(s){this._pullToBoundary=w(s,v),this.updateClassList()}get multipleRows(){return this._multipleRows||!1}set multipleRows(s){this._multipleRows=r(s),this.updateClassList()}connectedCallback(){super.connectedCallback(),this.updateClassList()}updateClassList(){this.classList.remove(...this._layoutClass);const s=function(s,t,l,i){const e=n("kdds-grid");return" "!==s&&m[s]&&e.add(m[s])," "!==t&&k[t]&&e.add(k[t])," "!==l&&_[l]&&e.add(_[l]),i&&e.add("kdds-wrap"),e}(this.horizontalAlign,this.verticalAlign,this.pullToBoundary,this.multipleRows);this._layoutClass=Object.keys(s),this.classList.add(...this._layoutClass)}}j.validationOptOut=["class"],l(j,{publicProps:{horizontalAlign:{config:3},verticalAlign:{config:3},pullToBoundary:{config:3},multipleRows:{config:3}},track:{_horizontalAlign:1,_verticalAlign:1,_pullToBoundary:1,_multipleRows:1},fields:["_layoutClass"]});const A=i(j,{tmpl:h,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\layout-",apiVersion:63});export{A as default};
