import type { Quarter } from '../../../../types' ; import type { Localize , LocalizeFn } from '../../../types' ; import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index' ; const eraValues = { narrow : [ 'aC' , 'dC' ] as const , abbreviated : [ 'a.C.' , 'd.C.' ] as const , wide : [ 'antes de Cristo' , 'depois de Cristo' ] as const , } ; const quarterValues = { narrow : [ '1' , '2' , '3' , '4' ] as const , abbreviated : [ 'T1' , 'T2' , 'T3' , 'T4' ] as const , wide : [ '1º trimestre' , '2º trimestre' , '3º trimestre' , '4º trimestre' , ] as const , } ; const monthValues = { narrow : [ 'j' , 'f' , 'm' , 'a' , 'm' , 'j' , 'j' , 'a' , 's' , 'o' , 'n' , 'd' ] as const , abbreviated : [ 'jan' , 'fev' , 'mar' , 'abr' , 'mai' , 'jun' , 'jul' , 'ago' , 'set' , 'out' , 'nov' , 'dez' , ] as const , wide : [ 'janeiro' , 'fevereiro' , 'março' , 'abril' , 'maio' , 'junho' , 'julho' , 'agosto' , 'setembro' , 'outubro' , 'novembro' , 'dezembro' , ] as const , } ; const dayValues = { narrow : [ 'd' , 's' , 't' , 'q' , 'q' , 's' , 's' ] as const , short : [ 'dom' , 'seg' , 'ter' , 'qua' , 'qui' , 'sex' , 'sáb' ] as const , abbreviated : [ 'dom' , 'seg' , 'ter' , 'qua' , 'qui' , 'sex' , 'sáb' ] as const , wide : [ 'domingo' , 'segunda-feira' , 'terça-feira' , 'quarta-feira' , 'quinta-feira' , 'sexta-feira' , 'sábado' , ] as const , } ; const dayPeriodValues = { narrow : { am : 'AM' , pm : 'PM' , midnight : 'meia-noite' , noon : 'meio-dia' , morning : 'manhã' , afternoon : 'tarde' , evening : 'noite' , night : 'madrugada' , } , abbreviated : { am : 'AM' , pm : 'PM' , midnight : 'meia-noite' , noon : 'meio-dia' , morning : 'manhã' , afternoon : 'tarde' , evening : 'noite' , night : 'madrugada' , } , wide : { am : 'AM' , pm : 'PM' , midnight : 'meia-noite' , noon : 'meio-dia' , morning : 'manhã' , afternoon : 'tarde' , evening : 'noite' , night : 'madrugada' , } , } ; const formattingDayPeriodValues = { narrow : { am : 'AM' , pm : 'PM' , midnight : 'meia-noite' , noon : 'meio-dia' , morning : 'da manhã' , afternoon : 'da tarde' , evening : 'da noite' , night : 'da madrugada' , } , abbreviated : { am : 'AM' , pm : 'PM' , midnight : 'meia-noite' , noon : 'meio-dia' , morning : 'da manhã' , afternoon : 'da tarde' , evening : 'da noite' , night : 'da madrugada' , } , wide : { am : 'AM' , pm : 'PM' , midnight : 'meia-noite' , noon : 'meio-dia' , morning : 'da manhã' , afternoon : 'da tarde' , evening : 'da noite' , night : 'da madrugada' , } , } ; 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 ;