{"version":3,"file":"Link.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Link.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AA2BnD,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,mBAAmB,CAAyB,IAAI,CAAC,CAAC","sourcesContent":["import type { AddressElement } from './Address';\nimport type { StandardFormattingElement } from './formatting';\nimport { type IconElement } from './Icon';\nimport { type ImageElement } from './Image';\nimport { createSnapComponent } from '../component';\nimport type { SnapsChildren } from '../component';\n\n/**\n * The children of the {@link Link} component.\n */\nexport type LinkChildren = SnapsChildren<\n  | string\n  | StandardFormattingElement\n  | IconElement\n  | ImageElement\n  | AddressElement\n>;\n\n/**\n * The props of the {@link Link} component.\n *\n * @property children - The text to display in the link.\n * @property href - The URL to link to. This must be an `https` or `mailto` URL.\n * `http` is not allowed.\n * @category Component Props\n */\nexport type LinkProps = {\n  children: LinkChildren;\n  href: string;\n};\n\nconst TYPE = 'Link';\n\n/**\n * A link component, which is used to display a hyperlink.\n *\n * @param props - The props of the component.\n * @param props.children - The text to display in the link.\n * @param props.href - The URL to link to. This must be an `https` or `mailto`\n * URL. `http` is not allowed.\n * @returns A link element.\n * @example\n * <Link href=\"https://example.com\">Click here</Link>\n * @category Components\n */\nexport const Link = createSnapComponent<LinkProps, typeof TYPE>(TYPE);\n\n/**\n * A link element.\n *\n * @see {@link Link}\n * @category Elements\n */\nexport type LinkElement = ReturnType<typeof Link>;\n"]}