import{r as m,g as u,bG as g,bH as f,j as d,Z as h}from"./main-TIUJvpaR.js";import{u as l}from"./use-date-formatter-hhGEq_P-.js";const y={numeric:{year:"numeric",month:"2-digit",day:"2-digit"},short:{year:"numeric",month:"short",day:"2-digit"},long:{month:"long",day:"2-digit",year:"numeric"},timestamp:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},time:{hour:"2-digit",minute:"2-digit"}},p=m.memo(({date:t,options:e,preset:n,timezone:a})=>{const{dates:r}=u(),s=g(),i=a||(e==null?void 0:e.timeZone)||s,o=e||y[n||(r==null?void 0:r.format)||"short"]||{};o.timeZone||(o.timeZone=i);const c=l(o);if(!t)return null;try{typeof t=="string"?t=f(t,i).toDate():"toDate"in t&&(t=t.toDate(i))}catch{return null}return d.jsx(m.Fragment,{children:c.format(t)})},h);export{y as D,p as F};
