{"version":3,"file":"AddressInput.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/AddressInput.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAsBtD,MAAM,IAAI,GAAG,cAAc,CAAC;AAE5B;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAC7C,IAAI,CACL,CAAC","sourcesContent":["import type { CaipChainId } from '@metamask/utils';\n\nimport { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link AddressInput} component.\n *\n * @property name - The name of the input field.\n * @property value - The value of the input field.\n * @property chainId - The CAIP-2 chain ID of the address.\n * @property placeholder - The placeholder text of the input field.\n * @property disabled - Whether the input field is disabled.\n * @property displayAvatar - Whether to display the avatar of the address.\n * @category Component Props\n */\nexport type AddressInputProps = {\n  name: string;\n  value?: string | undefined;\n  chainId: CaipChainId;\n  placeholder?: string | undefined;\n  disabled?: boolean | undefined;\n  displayAvatar?: boolean | undefined;\n};\n\nconst TYPE = 'AddressInput';\n\n/**\n * An input component for entering an address. Resolves the address to a display name and avatar.\n *\n * @param props - The props of the component.\n * @param props.name - The name of the input field.\n * @param props.value - The value of the input field.\n * @param props.chainId - The CAIP-2 chain ID of the address.\n * @param props.placeholder - The placeholder text of the input field.\n * @param props.disabled - Whether the input field is disabled.\n * @param props.displayAvatar - Whether to display the avatar of the address.\n * @returns An input element.\n * @example\n * <AddressInput name=\"address\" value=\"0x1234567890123456789012345678901234567890\" chainId=\"eip155:1\" />\n * @category Components\n */\nexport const AddressInput = createSnapComponent<AddressInputProps, typeof TYPE>(\n  TYPE,\n);\n\n/**\n * An address input element.\n *\n * @see {@link AddressInput}\n * @category Elements\n */\nexport type AddressInputElement = ReturnType<typeof AddressInput>;\n"]}