'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),Link=require("next/link"),core=require("@gem-sdk/core"),helpers=require("../../helpers.js");const CustomLink=({children:e,dataId:r,...t})=>{let{isPreviewSharePageMode:i}=core.useRenderMode(),n={title:t.title,"data-id":r},s=t.href?.toString(),l=()=>{helpers.handleClickLink({link:s,type:s?.startsWith("#el")?"open-popup":void 0})};return i?jsxRuntime.jsx("a",{...n,...t,href:s,onClick:l,children:e}):jsxRuntime.jsx(Link,{...n,...t,children:e})};exports.default=CustomLink;
