import type { Quarter } from '../../../../types' ; import type { Localize , LocalizeFn } from '../../../types' ; import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index' ; const eraValues = { narrow : [ 'k.a.' , 'k.o.' ] as const , abbreviated : [ 'k.a.' , 'k.o.' ] as const , wide : [ 'kristo aurretik' , 'kristo ondoren' ] as const , } ; const quarterValues = { narrow : [ '1' , '2' , '3' , '4' ] as const , abbreviated : [ '1H' , '2H' , '3H' , '4H' ] as const , wide : [ '1. hiruhilekoa' , '2. hiruhilekoa' , '3. hiruhilekoa' , '4. hiruhilekoa' , ] as const , } ; const monthValues = { narrow : [ 'u' , 'o' , 'm' , 'a' , 'm' , 'e' , 'u' , 'a' , 'i' , 'u' , 'a' , 'a' ] as const , abbreviated : [ 'urt' , 'ots' , 'mar' , 'api' , 'mai' , 'eka' , 'uzt' , 'abu' , 'ira' , 'urr' , 'aza' , 'abe' , ] as const , wide : [ 'urtarrila' , 'otsaila' , 'martxoa' , 'apirila' , 'maiatza' , 'ekaina' , 'uztaila' , 'abuztua' , 'iraila' , 'urria' , 'azaroa' , 'abendua' , ] as const , } ; const dayValues = { narrow : [ 'i' , 'a' , 'a' , 'a' , 'o' , 'o' , 'l' ] as const , short : [ 'ig' , 'al' , 'as' , 'az' , 'og' , 'or' , 'lr' ] as const , abbreviated : [ 'iga' , 'ast' , 'ast' , 'ast' , 'ost' , 'ost' , 'lar' ] as const , wide : [ 'igandea' , 'astelehena' , 'asteartea' , 'asteazkena' , 'osteguna' , 'ostirala' , 'larunbata' , ] as const , } ; const dayPeriodValues = { narrow : { am : 'a' , pm : 'p' , midnight : 'ge' , noon : 'eg' , morning : 'goiza' , afternoon : 'arratsaldea' , evening : 'arratsaldea' , night : 'gaua' , } , abbreviated : { am : 'AM' , pm : 'PM' , midnight : 'gauerdia' , noon : 'eguerdia' , morning : 'goiza' , afternoon : 'arratsaldea' , evening : 'arratsaldea' , night : 'gaua' , } , wide : { am : 'a.m.' , pm : 'p.m.' , midnight : 'gauerdia' , noon : 'eguerdia' , morning : 'goiza' , afternoon : 'arratsaldea' , evening : 'arratsaldea' , night : 'gaua' , } , } ; const formattingDayPeriodValues = { narrow : { am : 'a' , pm : 'p' , midnight : 'ge' , noon : 'eg' , morning : 'goizean' , afternoon : 'arratsaldean' , evening : 'arratsaldean' , night : 'gauean' , } , abbreviated : { am : 'AM' , pm : 'PM' , midnight : 'gauerdia' , noon : 'eguerdia' , morning : 'goizean' , afternoon : 'arratsaldean' , evening : 'arratsaldean' , night : 'gauean' , } , wide : { am : 'a.m.' , pm : 'p.m.' , midnight : 'gauerdia' , noon : 'eguerdia' , morning : 'goizean' , afternoon : 'arratsaldean' , evening : 'arratsaldean' , night : 'gauean' , } , } ; const ordinalNumber = ( dirtyNumber , _options ) => { const number = Number ( dirtyNumber ) ; return number + '.' ; } ; const localize = { ordinalNumber , era : buildLocalizeFn ( { values : eraValues , defaultWidth : 'wide' , } ) , quarter : buildLocalizeFn ( { values : quarterValues , defaultWidth : 'wide' , argumentCallback : ( quarter ) => ( quarter - 1 ) as Quarter , } ) , month : buildLocalizeFn ( { values : monthValues , defaultWidth : 'wide' , } ) , day : buildLocalizeFn ( { values : dayValues , defaultWidth : 'wide' , } ) , dayPeriod : buildLocalizeFn ( { values : dayPeriodValues , defaultWidth : 'wide' , formattingValues : formattingDayPeriodValues , defaultFormattingWidth : 'wide' , } ) , } ; export default localize ;