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