import type Input from "./Input.js"; import type { InputMethod } from "../../../../portal/jsonTypes.js"; /** @since 5.1 */ export interface AudioInputProperties extends Partial> {} /** * The `AudioInput` class defines a user interface for an input to which audio files can be attached. * * > [!CAUTION] * > * > * Input methods that are configured as only allowing `capture` are not supported. * > * Minimum input requirements apply only in mobile editing workflows when the input method is set to only allow capture and the minimum file count is greater than or equal to one. * > * When using specific input types, such as `AudioInput`, existing attachments are displayed only if they match the element's [keyword](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#attachmentKeyword). Existing attachments without a matching keyword are not shown. To display attachments that do not have a corresponding keyword, use the general [AttachmentInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AttachmentInput/) instead. This input type provides a more general approach to displaying attachments and does not require a keyword to be specified by setting the [attachmentAssociationType](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AttachmentInput/#attachmentAssociationType) accordingly. * * @since 5.1 * @see [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/) * @example * // Creates a new AudioInput for an attachment element within a form * const audioInput = new AudioInput({ * inputMethod: "capture", * maxDuration: 30 * }); */ export default class AudioInput extends Input { /** @since 5.1 */ constructor(properties?: AudioInputProperties); /** * The supported input methods used to attach an audio file. * * @default "any" * @since 5.1 */ accessor inputMethod: InputMethod; /** * Defines the maximum length of an attachment for this element in seconds. If not specified, there is no maximum length. * * @since 5.1 */ accessor maxDuration: number | null | undefined; /** * The input type identifier. * * @since 5.1 */ get type(): "audio"; }