{"version":3,"file":"formatDate-BgqnzMfH.js","sources":["../../../resources/js/Composables/formatDate.js"],"sourcesContent":["import { usePage } from \"@inertiajs/vue3\";\n\n/**\n * Format a given date string to a localized format based on the current locale\n *\n * @param {string} dateString - The date string to be formatted\n * @returns {string} The formatted date string in the localized format\n */\nexport function formatDate(dateString) {\n const page = usePage();\n\n const browserLocale = typeof navigator !== 'undefined' && navigator.language\n ? navigator.language.split('-')[0].toLowerCase()\n : 'en';\n\n const options = {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n };\n\n return new Date(dateString).toLocaleDateString(\n page.props.app.locale.current || browserLocale,\n options\n );\n}\n"],"names":["formatDate","dateString","page","usePage","browserLocale","options"],"mappings":"gYAQO,SAASA,EAAWC,EAAY,CACnC,MAAMC,EAAOC,EAAS,EAEhBC,EAAgB,OAAO,UAAc,KAAe,UAAU,SAC9D,UAAU,SAAS,MAAM,GAAG,EAAE,CAAC,EAAE,YAAW,EAC5C,KAEAC,EAAU,CACZ,KAAM,UACN,MAAO,OACP,IAAK,UACL,KAAM,UACN,OAAQ,SACX,EAED,OAAO,IAAI,KAAKJ,CAAU,EAAE,mBACxBC,EAAK,MAAM,IAAI,OAAO,SAAWE,EACjCC,CACH,CACL"}