import type { Quarter } from '../../../../types' ; import type { Localize , LocalizeFn } from '../../../types' ; import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index' ; const eraValues = { narrow : [ 'pr.n.e.' , 'AD' ] as const , abbreviated : [ 'pr. Kr.' , 'po. Kr.' ] as const , wide : [ 'Prije Krista' , 'Poslije Krista' ] as const , } ; const quarterValues = { narrow : [ '1.' , '2.' , '3.' , '4.' ] as const , abbreviated : [ '1. kv.' , '2. kv.' , '3. kv.' , '4. kv.' ] as const , wide : [ '1. kvartal' , '2. kvartal' , '3. kvartal' , '4. kvartal' ] as const , } ; const monthValues = { narrow : [ '1.' , '2.' , '3.' , '4.' , '5.' , '6.' , '7.' , '8.' , '9.' , '10.' , '11.' , '12.' , ] as const , abbreviated : [ 'sij' , 'velj' , 'ožu' , 'tra' , 'svi' , 'lip' , 'srp' , 'kol' , 'ruj' , 'lis' , 'stu' , 'pro' , ] as const , wide : [ 'siječanj' , 'veljača' , 'ožujak' , 'travanj' , 'svibanj' , 'lipanj' , 'srpanj' , 'kolovoz' , 'rujan' , 'listopad' , 'studeni' , 'prosinac' , ] as const , } ; const formattingMonthValues = { narrow : [ '1.' , '2.' , '3.' , '4.' , '5.' , '6.' , '7.' , '8.' , '9.' , '10.' , '11.' , '12.' , ] as const , abbreviated : [ 'sij' , 'velj' , 'ožu' , 'tra' , 'svi' , 'lip' , 'srp' , 'kol' , 'ruj' , 'lis' , 'stu' , 'pro' , ] as const , wide : [ 'siječnja' , 'veljače' , 'ožujka' , 'travnja' , 'svibnja' , 'lipnja' , 'srpnja' , 'kolovoza' , 'rujna' , 'listopada' , 'studenog' , 'prosinca' , ] as const , } ; const dayValues = { narrow : [ 'N' , 'P' , 'U' , 'S' , 'Č' , 'P' , 'S' ] as const , short : [ 'ned' , 'pon' , 'uto' , 'sri' , 'čet' , 'pet' , 'sub' ] as const , abbreviated : [ 'ned' , 'pon' , 'uto' , 'sri' , 'čet' , 'pet' , 'sub' ] as const , wide : [ 'nedjelja' , 'ponedjeljak' , 'utorak' , 'srijeda' , 'četvrtak' , 'petak' , 'subota' , ] as const , } ; const formattingDayPeriodValues = { narrow : { am : 'AM' , pm : 'PM' , midnight : 'ponoć' , noon : 'podne' , morning : 'ujutro' , afternoon : 'popodne' , evening : 'navečer' , night : 'noću' , } , abbreviated : { am : 'AM' , pm : 'PM' , midnight : 'ponoć' , noon : 'podne' , morning : 'ujutro' , afternoon : 'popodne' , evening : 'navečer' , night : 'noću' , } , wide : { am : 'AM' , pm : 'PM' , midnight : 'ponoć' , noon : 'podne' , morning : 'ujutro' , afternoon : 'poslije podne' , evening : 'navečer' , night : 'noću' , } , } ; const dayPeriodValues = { narrow : { am : 'AM' , pm : 'PM' , midnight : 'ponoć' , noon : 'podne' , morning : 'ujutro' , afternoon : 'popodne' , evening : 'navečer' , night : 'noću' , } , abbreviated : { am : 'AM' , pm : 'PM' , midnight : 'ponoć' , noon : 'podne' , morning : 'ujutro' , afternoon : 'popodne' , evening : 'navečer' , night : 'noću' , } , wide : { am : 'AM' , pm : 'PM' , midnight : 'ponoć' , noon : 'podne' , morning : 'ujutro' , afternoon : 'poslije podne' , evening : 'navečer' , night : 'noću' , } , } ; 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' , formattingValues : formattingMonthValues , defaultFormattingWidth : 'wide' , } ) , day : buildLocalizeFn ( { values : dayValues , defaultWidth : 'wide' , } ) , dayPeriod : buildLocalizeFn ( { values : dayPeriodValues , defaultWidth : 'wide' , formattingValues : formattingDayPeriodValues , defaultFormattingWidth : 'wide' , } ) , } ; export default localize ;