import type Input from "./Input.js";
import type { InputMethod } from "../../../../portal/jsonTypes.js";

/** @internal */
export interface VideoInputProperties extends Partial<Pick<VideoInput, "inputMethod" | "maxDuration">> {}

/**
 * The `VideoInput` class defines a user interface for an input to which a video file can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate`. This is displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/) widget.
 *
 * > [!CAUTION]
 * >
 * > This class is not yet fully supported within the SDK and is not intended for use in development. Support will be added in an upcoming release.
 *
 * @internal
 * @since 4.31
 * @see [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/)
 * @example
 * // Creates a new VideoInput for an attachment element within a form
 * const videoInput = new VideoInput({
 *   inputMethod: "upload",
 *   maxDuration: 90
 * });
 */
export default class VideoInput extends Input {
  /** @internal */
  constructor(properties?: VideoInputProperties);
  /**
   * The supported input methods used to attach a video.
   *
   * @default "any"
   * @internal
   */
  accessor inputMethod: InputMethod;
  /**
   * Defines the maximum length of an attachment for this element in seconds. If not specified, there is no maximum length.
   *
   * @internal
   */
  accessor maxDuration: number | null | undefined;
  /**
   * The input type identifier. Valid value of this property is "video"
   *
   * @internal
   * @since 5.0
   */
  get type(): "video";
}