'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Link=require("next/link"),Text=require("../../text/components/Text.js"),core=require("@gem-sdk/core"),useArticleLink=require("../hooks/useArticleLink.js"),system=require("@gem-sdk/system");const ArticleTitle=({setting:e,builderProps:t,styles:i})=>{let r=core.useArticleStore(e=>e.article),{shopifyArticleLink:s}=useArticleLink.useArticleLink(),l=e?.openNewTab?"_blank":"_self";return jsxRuntime.jsx("div",{id:`shopify-text-element-${t?.uid}`,"data-article-id":r?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:system.If(r?e?.enableLink:null,jsxRuntime.jsx(Link,{href:s,target:l,title:r?.title,children:jsxRuntime.jsx(Text.default,{builderProps:t,styles:i,setting:{...e,text:r.title,excludeFlex:!0}})}),jsxRuntime.jsx(Text.default,{builderProps:t,styles:i,setting:{...e,text:r.title,excludeFlex:!0}}))})};exports.default=ArticleTitle;
