'use client';
import{jsx as e}from"react/jsx-runtime";import t from"next/link";import i from"../../text/components/Text.js";import{useArticleStore as l}from"@gem-sdk/core";import{useArticleLink as r}from"../hooks/useArticleLink.js";import{If as o}from"@gem-sdk/system";let ArticleTitle=({setting:s,builderProps:n,styles:m})=>{let d=l(e=>e.article),{shopifyArticleLink:c}=r(),p=s?.openNewTab?"_blank":"_self";return e("div",{id:`shopify-text-element-${n?.uid}`,"data-article-id":d?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:o(d?s?.enableLink:null,e(t,{href:c,target:p,title:d?.title,children:e(i,{builderProps:n,styles:m,setting:{...s,text:d.title,excludeFlex:!0}})}),e(i,{builderProps:n,styles:m,setting:{...s,text:d.title,excludeFlex:!0}}))})};export{ArticleTitle as default};
