{"version":3,"file":"get-months-list.mjs","names":[],"sources":["../../../src/utils/get-months-list/get-months-list.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport { DateLabelFormat } from '../../types';\nimport { formatDate } from '../format-date/format-date';\n\ninterface GetMonthsListInput {\n  locale: string;\n  format: DateLabelFormat;\n}\n\ninterface MonthData {\n  month: number;\n  name: string;\n}\n\nexport function getMonthsList({ locale, format }: GetMonthsListInput) {\n  const months: MonthData[] = [];\n  const date = dayjs().locale(locale).startOf('year');\n\n  for (let i = 0; i < 12; i++) {\n    months.push({ month: i, name: formatDate({ date: date.add(i, 'month'), format, locale }) });\n  }\n\n  return months;\n}\n"],"mappings":";;;;AAcA,SAAgB,cAAc,EAAE,QAAQ,UAA8B;CACpE,MAAM,SAAsB,CAAC;CAC7B,MAAM,OAAO,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM;CAElD,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,KACtB,OAAO,KAAK;EAAE,OAAO;EAAG,MAAM,WAAW;GAAE,MAAM,KAAK,IAAI,GAAG,OAAO;GAAG;GAAQ;EAAO,CAAC;CAAE,CAAC;CAG5F,OAAO;AACT"}