"use strict";var e=require("@kdcloudjs/kwc"),t=require("../i18n-CP31jeWH.js");require("../observable-BXDJFaLN.js");var s=require("../normalize-DKPi18vK.js"),i=require("../intlFormat-Bs-dlvDH.js");require("./configProvider.js");var a=require("./shadowBaseClassPrivate.js");function r(e,t,s,i){const{d:a,t:r}=e;return[t.hasValue?r(a(t.formattedName)):null]}require("../empty_html-hFq4zm9t.js"),require("./i18nCldrOptions.js"),require("../ssr-RXknEJpO.js"),require("./iso8601Utils.js"),require("./i18nService.js"),require("./features.js"),require("./utilsPrivate.js"),require("../client-Co_j5m_k.js"),require("../colorValid-BBnkvgd_.js"),require("../classSet-B5xuJbNb.js"),require("../labelUtils-C2UzbgdZ.js"),require("../label-DdXuOVTE.js");var m=e.registerTemplate(r);r.stylesheets=[],r.stylesheetToken="kwc-1a2tk9lunde",r.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\formattedName-undefined_formattedName",e.freezeTemplate(r);const o="long";class l extends a{constructor(...e){super(...e),this.format=o,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(e){this._salutation=e}get firstName(){return this._firstName}set firstName(e){this._firstName=e}get lastName(){return this._lastName}set lastName(e){this._lastName=e}get middleName(){return this._middleName}set middleName(e){this._middleName=e}get suffix(){return this._suffix}set suffix(e){this._suffix=e}get informalName(){return this._informalName}set informalName(e){this._informalName=e}get normalizedFormat(){return s.normalizeString(this.format,{fallbackValue:o,validValues:["short","medium","long"]})}get hasValue(){return!!(this.salutation||this.firstName||this.lastName||this.middleName||this.suffix||this.informalName)}get formattedName(){const{normalizedFormat:e}=this,s={first:this.firstName,middle:this.middleName,last:this.lastName,salutation:this.salutation,suffix:this.suffix,informal:this.informalName};let a="";const r=t.locale.replace(/-/g,"_");switch(e){case"short":a=i.name.formatNameShort(r,s);break;case"medium":a=i.name.formatNameMedium(r,s);break;default:a=i.name.formatNameLong(r,s)}return a}}e.registerDecorators(l,{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 n=e.registerComponent(l,{tmpl:m,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\formattedName-",apiVersion:63});module.exports=n;
