import{registerTemplate as t,freezeTemplate as e,registerDecorators as s,registerComponent as a}from"@kdcloudjs/kwc";import{l as i}from"../i18n-B98kiI7M.js";import"../observable-tloG64m6.js";import{n as m}from"../utilsPrivate-CI3EeA5x.js";import{n as o}from"../intlFormat-DNT_1eg4.js";import"./configProvider.js";import r from"./shadowBaseClassPrivate.js";import"../empty_html-CjXB8rB4.js";import"../client-Ddi3i8XR.js";import"../ssr-C2pjZzfv.js";import"./iso8601Utils.js";import"../colorValid-qIPgkqGp.js";import"./i18nCldrOptions.js";import"./i18nService.js";import"./features.js";import"../classSet-DY6Qvt6E.js";import"../labelUtils-DAuN2uUV.js";import"../label-CY8Q8HAO.js";function l(t,e,s,a){const{d:i,t:m}=t;return[e.hasValue?m(i(e.formattedName)):null]}var n=t(l);l.stylesheets=[],l.stylesheetToken="kwc-1a2tk9lunde",l.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\formattedName-undefined_formattedName",e(l);const f="long";class d extends r{constructor(...t){super(...t),this.format=f,this._salutation=void 0,this._firstName=void 0,this._lastName=void 0,this._middleName=void 0,this._suffix=void 0,this._informalName=void 0}get salutation(){return this._salutation}set salutation(t){this._salutation=t}get firstName(){return this._firstName}set firstName(t){this._firstName=t}get lastName(){return this._lastName}set lastName(t){this._lastName=t}get middleName(){return this._middleName}set middleName(t){this._middleName=t}get suffix(){return this._suffix}set suffix(t){this._suffix=t}get informalName(){return this._informalName}set informalName(t){this._informalName=t}get normalizedFormat(){return m(this.format,{fallbackValue:f,validValues:["short","medium","long"]})}get hasValue(){return!!(this.salutation||this.firstName||this.lastName||this.middleName||this.suffix||this.informalName)}get formattedName(){const{normalizedFormat:t}=this,e={first:this.firstName,middle:this.middleName,last:this.lastName,salutation:this.salutation,suffix:this.suffix,informal:this.informalName};let s="";const a=i.replace(/-/g,"_");switch(t){case"short":s=o.formatNameShort(a,e);break;case"medium":s=o.formatNameMedium(a,e);break;default:s=o.formatNameLong(a,e)}return s}}s(d,{publicProps:{format:{config:0},salutation:{config:3},firstName:{config:3},lastName:{config:3},middleName:{config:3},suffix:{config:3},informalName:{config:3}},track:{_salutation:1,_firstName:1,_lastName:1,_middleName:1,_suffix:1,_informalName:1}});const u=a(d,{tmpl:n,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\formattedName-",apiVersion:63});export{u as default};
