'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../text/components/Text.js"),r=require("react"),i=require("@gem-sdk/core");exports.default=({setting:s,builderProps:l,styles:n})=>{let{dateFormat:o}=s??{},a=i.useArticleStore(e=>e.article),{timezone:u}=i.useTimezone(),d=(e,t)=>{let r=t?.split(" ")?.[1]??"";return r?new Date(new Date(e).toLocaleString("en-US",{timeZone:r})):e},c=r.useMemo(()=>{let e=d(new Date(a.publishedAt),u??""),{locales:t,options:r}=JSON.parse(o??'{"locales":"en-US","options":{"month":"short","day":"2-digit","year":"numeric"}}');return e.toLocaleDateString(t,r)},[a.publishedAt,u,o]);return e.jsx("div",{id:`shopify-text-element-${l?.uid}`,"data-article-id":a?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:e.jsx(t.default,{builderProps:l,styles:n,setting:{...s,text:c,excludeFlex:!0},disableEdit:!0})})};
