{"version":3,"names":["getHyperLinkObject","link","href"],"sources":["src/components/core/interfaces/Hyperlink.ts"],"sourcesContent":["/**\n * An interface for a hyperlink\n * @docs\n * @global\n */\nexport interface HyperlinkObj {\n /* the hyperlink url (fragment) value */\n href: string;\n\n /* the language of the linked resource */\n hreflang?: string;\n\n /* the relationship between the current document and the linked document */\n rel?: string;\n\n /* the context in which the linked resource will open */\n target?: string;\n\n /* the onClick handler of the link */\n onClick?: (evt: MouseEvent) => void;\n}\n\n/**\n * Describes a link.\n * @docs\n * @global\n */\nexport type Hyperlink = HyperlinkObj | string;\n\n/**\n * Given a link object or string (href), this function will return the full object that describes a link\n * That way we can \"combine\" the two possible link inputs (string or obj) and work with objects as a result\n * @param {Hyperlink} link The link data\n * @returns {HyperlinkObj} The link in obj form\n */\nexport const getHyperLinkObject = (link: Hyperlink): HyperlinkObj => {\n if (typeof link === 'string') {\n return { href: link };\n }\n return link;\n};\n"],"mappings":"MAmCaA,EAAsBC,IACjC,UAAWA,IAAS,SAAU,CAC5B,MAAO,CAAEC,KAAMD,E,CAEjB,OAAOA,CAAI,S"}