import{__decorate as t}from"tslib";import{checkArg as e}from"../utilities/checkArg.js";import{settings as i}from"../utilities/format/FormatSettings.js";import{isValidTimeZone as r,ERR_TIME_ZONE_INVALID as s}from"../utilities/format/date.js";import{DateFormat as a,NumberFormat as n,TimeFormat as o}from"../utilities/format/formats.js";import{serializable as m}from"./Serializable.js";import{Settings as l}from"./Settings.js";let g=class extends l{get dateFormat(){return this._getSetting("dateFormat",i.dateFormat||a.DEFAULT)}set dateFormat(t){this._setSetting("dateFormat",t)}get timeFormat(){return this._getSetting("timeFormat",i.timeFormat||o.DEFAULT)}set timeFormat(t){this._setSetting("timeFormat",t)}get numberFormat(){return this._getSetting("numberFormat",i.numberFormat||n.DEFAULT)}set numberFormat(t){this._setSetting("numberFormat",t)}get locale(){return this._getSetting("locale")}set locale(t){this._setSetting("locale",t)}get currency(){return this._getSetting("currency",i.currency)}set currency(t){this._setSetting("currency",t)}get fractionalDigits(){return this._getSetting("fractionalDigits",i.fractionalDigits)}set fractionalDigits(t){this._setSetting("fractionalDigits",t)}get timeZone(){return this._getSetting("timeZone")}set timeZone(t){e("timeZone",t).satisfies(r,s(t)),this._setSetting("timeZone",t)}get useFieldInfo(){return this._getSetting("useFieldInfo",!0)}set useFieldInfo(t){this._setSetting("useFieldInfo",t)}_hasSettingIncludingAncestor(t){return!!["useFieldInfo","dateFormat","timeFormat","numberFormat"].some((e=>e===t))||super._hasSettingIncludingAncestor(t)}_getSerializableProperties(){return{dateFormat:{serializeModes:["initial"],default:i.dateFormat||a.DEFAULT},timeFormat:{serializeModes:["initial"],default:i.timeFormat||o.DEFAULT},numberFormat:{serializeModes:["initial"],default:i.numberFormat||n.DEFAULT},locale:"initial",currency:{serializeModes:["initial"],default:i.currency},fractionalDigits:{serializeModes:["initial"],default:i.fractionalDigits},timeZone:{serializeModes:["initial"],deserialize:t=>{t&&(this.timeZone=t)}},useFieldInfo:{serializeModes:["initial"],default:!0}}}};g=t([m],g);export{g as FormatSettings};