{"version":3,"file":"Address.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Address.ts"],"names":[],"mappings":";;;AAEA,gDAAmD;AAmBnD,MAAM,IAAI,GAAG,SAAS,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,OAAO,GAAG,IAAA,+BAAmB,EAA4B,IAAI,CAAC,CAAC","sourcesContent":["import type { CaipAccountId } from '@metamask/utils';\n\nimport { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Address} component.\n *\n * @property address - The (Ethereum) address to display. This should be a\n * valid Ethereum address, starting with `0x`, or a valid CAIP-10 address.\n * @property truncate - Whether to truncate the address. Defaults to `true`.\n * @property displayName - Whether to show the account name. Defaults to `false`.\n * @property avatar - Whether to show the address avatar. Defaults to `true`.\n * @category Component Props\n */\nexport type AddressProps = {\n  address: `0x${string}` | CaipAccountId;\n  truncate?: boolean | undefined;\n  displayName?: boolean | undefined;\n  avatar?: boolean | undefined;\n};\n\nconst TYPE = 'Address';\n\n/**\n * An address component, which is used to display a CAIP-10 address or a Ethereum address.\n *\n * This component does not accept any children.\n *\n * @param props - The props of the component.\n * @param props.address - The address to display. This should be a\n * valid Ethereum address, starting with `0x`, or a valid CAIP-10 address.\n * @param props.truncate - Whether to truncate the address. Defaults to `true`.\n * @param props.displayName - Whether to show the account name. Defaults to `false`.\n * @param props.avatar - Whether to show the address avatar. Defaults to `true`.\n * @returns An address element.\n * @example\n * <Address address=\"0x1234567890123456789012345678901234567890\" />\n * @example\n * <Address address=\"eip155:1:0x1234567890123456789012345678901234567890\" />\n * @example\n * <Address address=\"bip122:000000000019d6689c085ae165831e93:128Lkh3S7CkDTBZ8W7BbpsN3YYizJMp8p6\" />\n * @example\n * <Address address=\"0x1234567890123456789012345678901234567890\" truncate={false} avatar={false} />\n * @example\n * <Address address=\"0x1234567890123456789012345678901234567890\" displayName={true} />\n * @category Components\n */\nexport const Address = createSnapComponent<AddressProps, typeof TYPE>(TYPE);\n\n/**\n * An address element.\n *\n * @see {@link Address}\n * @category Elements\n */\nexport type AddressElement = ReturnType<typeof Address>;\n"]}