'use client';
import{jsx as t}from"react/jsx-runtime";import e from"next/link";import{useRenderMode as r}from"@gem-sdk/core";import{handleClickLink as i}from"../../helpers.js";let CustomLink=({children:o,dataId:l,...m})=>{let{isPreviewSharePageMode:n}=r(),p={title:m.title,"data-id":l},s=m.href?.toString(),a=()=>{i({link:s,type:s?.startsWith("#el")?"open-popup":void 0})};return n?t("a",{...p,...m,href:s,onClick:a,children:o}):t(e,{...p,...m,children:o})};export{CustomLink as default};
