"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var MediaInput_exports = {};
__export(MediaInput_exports, {
  MediaInput: () => MediaInput
});
module.exports = __toCommonJS(MediaInput_exports);
var import_MatterDefinition = require("../MatterDefinition.js");
var import_elements = require("../../elements/index.js");
/**
 * @license
 * Copyright 2022-2024 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const MediaInput = (0, import_elements.ClusterElement)({
  name: "MediaInput",
  id: 1287,
  classification: "application",
  pics: "MEDIAINPUT",
  details: "This cluster provides an interface for controlling the Input Selector on a media device such as a Video Player.\nThis cluster would be implemented on TV and other media streaming devices, as well as devices that provide input to or output from such devices.\nThis cluster provides the list of available inputs and provides commands for selecting and renaming them.\nThe cluster server for Media Input is implemented by a device that has selectable input, such as a Video Player device.",
  xref: { document: "cluster", section: "6.9" },
  children: [
    (0, import_elements.AttributeElement)({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
    (0, import_elements.AttributeElement)({
      name: "FeatureMap",
      id: 65532,
      type: "FeatureMap",
      xref: { document: "cluster", section: "6.9.4" },
      children: [(0, import_elements.FieldElement)({
        name: "NU",
        constraint: "0",
        description: "NameUpdates",
        details: "Supports updates to the input names"
      })]
    }),
    (0, import_elements.AttributeElement)({
      name: "InputList",
      id: 0,
      type: "list",
      access: "R V",
      conformance: "M",
      details: "This attribute shall provide a list of the media inputs supported by the device.",
      xref: { document: "cluster", section: "6.9.6.1" },
      children: [(0, import_elements.FieldElement)({ name: "entry", type: "InputInfoStruct" })]
    }),
    (0, import_elements.AttributeElement)({
      name: "CurrentInput",
      id: 1,
      type: "uint8",
      access: "R V",
      conformance: "M",
      details: "This attribute shall contain the value of the index field of the currently selected InputInfoStruct.",
      xref: { document: "cluster", section: "6.9.6.2" }
    }),
    (0, import_elements.CommandElement)({
      name: "SelectInput",
      id: 0,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "status",
      details: "Upon receipt, this command shall change the media input on the device to the input at a specific index in the Input List.",
      xref: { document: "cluster", section: "6.9.7.1" },
      children: [(0, import_elements.FieldElement)({
        name: "Index",
        id: 0,
        type: "uint8",
        conformance: "M",
        details: "This field shall indicate the index field of the InputInfoStruct from the InputList attribute in which to change to.",
        xref: { document: "cluster", section: "6.9.7.1.1" }
      })]
    }),
    (0, import_elements.CommandElement)({
      name: "ShowInputStatus",
      id: 1,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "status",
      details: "Upon receipt, this command shall display the active status of the input list on screen.",
      xref: { document: "cluster", section: "6.9.7.2" }
    }),
    (0, import_elements.CommandElement)({
      name: "HideInputStatus",
      id: 2,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "status",
      details: "Upon receipt, this command shall hide the input list from the screen.",
      xref: { document: "cluster", section: "6.9.7.3" }
    }),
    (0, import_elements.CommandElement)({
      name: "RenameInput",
      id: 3,
      access: "M",
      conformance: "NU",
      direction: "request",
      response: "status",
      details: "Upon receipt, this command shall rename the input at a specific index in the Input List. Updates to the input name shall appear in the device\u2019s settings menus.",
      xref: { document: "cluster", section: "6.9.7.4" },
      children: [
        (0, import_elements.FieldElement)({ name: "Index", id: 0, type: "uint8", conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Name", id: 1, type: "string", conformance: "M" })
      ]
    }),
    (0, import_elements.DatatypeElement)({
      name: "InputTypeEnum",
      type: "enum8",
      xref: { document: "cluster", section: "6.9.5.1" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Internal",
          id: 0,
          conformance: "M",
          description: "Indicates content not coming from a physical input."
        }),
        (0, import_elements.FieldElement)({ name: "Aux", id: 1, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Coax", id: 2, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Composite", id: 3, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Hdmi", id: 4, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Input", id: 5, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Line", id: 6, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Optical", id: 7, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Video", id: 8, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Scart", id: 9, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Usb", id: 10, conformance: "M" }),
        (0, import_elements.FieldElement)({ name: "Other", id: 11, conformance: "M" })
      ]
    }),
    (0, import_elements.DatatypeElement)({
      name: "InputInfoStruct",
      type: "struct",
      details: "This contains information about an input.",
      xref: { document: "cluster", section: "6.9.5.2" },
      children: [
        (0, import_elements.FieldElement)({
          name: "Index",
          id: 0,
          type: "uint8",
          conformance: "M",
          details: "This field shall indicate the unique index into the list of Inputs.",
          xref: { document: "cluster", section: "6.9.5.2.1" }
        }),
        (0, import_elements.FieldElement)({
          name: "InputType",
          id: 1,
          type: "InputTypeEnum",
          conformance: "M",
          constraint: "desc",
          details: "This field shall indicate the type of input",
          xref: { document: "cluster", section: "6.9.5.2.2" }
        }),
        (0, import_elements.FieldElement)({
          name: "Name",
          id: 2,
          type: "string",
          conformance: "M",
          details: "This field shall indicate the input name, such as \u201CHDMI 1\u201D. This field may be blank, but SHOULD be provided when known.",
          xref: { document: "cluster", section: "6.9.5.2.3" }
        }),
        (0, import_elements.FieldElement)({
          name: "Description",
          id: 3,
          type: "string",
          conformance: "M",
          details: "This field shall indicate the user editable input description, such as \u201CLiving room Playstation\u201D. This field may be blank, but SHOULD be provided when known.",
          xref: { document: "cluster", section: "6.9.5.2.4" }
        })
      ]
    })
  ]
});
import_MatterDefinition.MatterDefinition.children.push(MediaInput);
//# sourceMappingURL=MediaInput.js.map
