import type { Quarter } from '../../../../types' ; import type { Localize , LocalizeFn } from '../../../types' ; import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index' ; const eraValues = { narrow : [ 'SM' , 'M' ] as const , abbreviated : [ 'SM' , 'M' ] as const , wide : [ 'Sebelum Masehi' , 'Masehi' ] as const , } ; const quarterValues = { narrow : [ '1' , '2' , '3' , '4' ] as const , abbreviated : [ 'K1' , 'K2' , 'K3' , 'K4' ] as const , wide : [ 'Kuartal ke-1' , 'Kuartal ke-2' , 'Kuartal ke-3' , 'Kuartal ke-4' , ] as const , } ; const monthValues = { narrow : [ 'J' , 'F' , 'M' , 'A' , 'M' , 'J' , 'J' , 'A' , 'S' , 'O' , 'N' , 'D' ] as const , abbreviated : [ 'Jan' , 'Feb' , 'Mar' , 'Apr' , 'Mei' , 'Jun' , 'Jul' , 'Agt' , 'Sep' , 'Okt' , 'Nov' , 'Des' , ] as const , wide : [ 'Januari' , 'Februari' , 'Maret' , 'April' , 'Mei' , 'Juni' , 'Juli' , 'Agustus' , 'September' , 'Oktober' , 'November' , 'Desember' , ] as const , } ; const dayValues = { narrow : [ 'M' , 'S' , 'S' , 'R' , 'K' , 'J' , 'S' ] as const , short : [ 'Min' , 'Sen' , 'Sel' , 'Rab' , 'Kam' , 'Jum' , 'Sab' ] as const , abbreviated : [ 'Min' , 'Sen' , 'Sel' , 'Rab' , 'Kam' , 'Jum' , 'Sab' ] as const , wide : [ 'Minggu' , 'Senin' , 'Selasa' , 'Rabu' , 'Kamis' , 'Jumat' , 'Sabtu' , ] as const , } ; const dayPeriodValues = { narrow : { am : 'AM' , pm : 'PM' , midnight : 'tengah malam' , noon : 'tengah hari' , morning : 'pagi' , afternoon : 'siang' , evening : 'sore' , night : 'malam' , } , abbreviated : { am : 'AM' , pm : 'PM' , midnight : 'tengah malam' , noon : 'tengah hari' , morning : 'pagi' , afternoon : 'siang' , evening : 'sore' , night : 'malam' , } , wide : { am : 'AM' , pm : 'PM' , midnight : 'tengah malam' , noon : 'tengah hari' , morning : 'pagi' , afternoon : 'siang' , evening : 'sore' , night : 'malam' , } , } ; const formattingDayPeriodValues = { narrow : { am : 'AM' , pm : 'PM' , midnight : 'tengah malam' , noon : 'tengah hari' , morning : 'pagi' , afternoon : 'siang' , evening : 'sore' , night : 'malam' , } , abbreviated : { am : 'AM' , pm : 'PM' , midnight : 'tengah malam' , noon : 'tengah hari' , morning : 'pagi' , afternoon : 'siang' , evening : 'sore' , night : 'malam' , } , wide : { am : 'AM' , pm : 'PM' , midnight : 'tengah malam' , noon : 'tengah hari' , morning : 'pagi' , afternoon : 'siang' , evening : 'sore' , night : 'malam' , } , } ; const ordinalNumber = ( dirtyNumber , _options ) => { const number = Number ( dirtyNumber ) ; return 'ke-' + 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 ;