{"version":3,"file":"format-date-time.cjs","names":["createComponent","formatDateTimeStyle","useFormatDateTime","styled"],"sources":["../../../../src/components/format/format-date-time.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { FormatDateTimeStyle } from \"./format-date-time.style\"\nimport type { FormatDateTimeOptions } from \"./use-format-date-time\"\nimport { createComponent, styled } from \"../../core\"\nimport { formatDateTimeStyle } from \"./format-date-time.style\"\nimport { useFormatDateTime } from \"./use-format-date-time\"\n\nexport interface FormatDateTimeProps\n  extends HTMLStyledProps<\"span\">,\n    ThemeProps<FormatDateTimeStyle>,\n    FormatDateTimeOptions {\n  /**\n   * The date time to format\n   */\n  value: Date\n}\n\nconst {\n  PropsContext: FormatDateTimePropsContext,\n  usePropsContext: useFormatDateTimePropsContext,\n  withContext,\n} = createComponent<FormatDateTimeProps, FormatDateTimeStyle>(\n  \"format-date-time\",\n  formatDateTimeStyle,\n)\n\nexport { FormatDateTimePropsContext, useFormatDateTimePropsContext }\n\n/**\n * `Format` is used to format dates, numbers, and bytes according to a specific locale.\n *\n * @see https://yamada-ui.com/docs/components/format\n */\nexport const FormatDateTime = withContext(\n  ({\n    calendar,\n    dateStyle,\n    day,\n    dayPeriod,\n    era,\n    formatMatcher,\n    fractionalSecondDigits,\n    hour,\n    hour12,\n    hourCycle,\n    locale,\n    localeMatcher,\n    minute,\n    month,\n    numberingSystem,\n    second,\n    timeStyle,\n    timeZone,\n    timeZoneName,\n    value,\n    weekday,\n    year,\n    ...rest\n  }) => {\n    const text = useFormatDateTime(value, {\n      calendar,\n      dateStyle,\n      day,\n      dayPeriod,\n      era,\n      formatMatcher,\n      fractionalSecondDigits,\n      hour,\n      hour12,\n      hourCycle,\n      locale,\n      localeMatcher,\n      minute,\n      month,\n      numberingSystem,\n      second,\n      timeStyle,\n      timeZone,\n      timeZoneName,\n      weekday,\n      year,\n    })\n\n    return <styled.span {...rest}>{text}</styled.span>\n  },\n)()\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAM,EACJ,cAAc,4BACd,iBAAiB,+BACjB,gBACEA,yCACF,oBACAC,mDACD;;;;;;AASD,MAAa,iBAAiB,aAC3B,EACC,UACA,WACA,KACA,WACA,KACA,eACA,wBACA,MACA,QACA,WACA,QACA,eACA,QACA,OACA,iBACA,QACA,WACA,UACA,cACA,OACA,SACA,KACA,GAAG,WACC;CACJ,MAAM,OAAOC,+CAAkB,OAAO;EACpC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QAAO,2CAACC,uBAAO;EAAK,GAAI;YAAO;GAAmB;EAErD,EAAE"}