"use strict";var e=require("@gem-sdk/core"),r=require("../../link/common/helpers.js"),t=require("react");exports.useArticleLink=()=>{let o=e.useArticleStore(e=>e.article),l=e.useShopStore(e=>e.storefrontUrl),{isPreviewSharePageMode:n}=e.useRenderMode(),s=o?.handle?r.urlJoin("blogs",o?.blog?.handle??"",o.handle):"#",u=t.useMemo(()=>{if(n)return`/articles/${o?.handle}`;if(!l)return"#";let e=new URL(l);return o?`${e.protocol}//${e.host}/${s}`:"#"},[l,o,s,n]);return{shopifyArticleLink:u}};
