/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { MatterDefinition } from "../MatterDefinition.js";
import {
  ClusterElement as Cluster,
  AttributeElement as Attribute,
  FieldElement as Field,
  CommandElement as Command,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const ApplicationLauncher = Cluster(
  { name: "ApplicationLauncher", id: 1292, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 2 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "AP", constraint: "0", title: "ApplicationPlatform" })
  ),
  Attribute(
    { name: "CatalogList", id: 0, type: "list", access: "R V", conformance: "AP", quality: "N" },
    Field({ name: "entry", type: "uint16" })
  ),
  Attribute({
    name: "CurrentApp",
    id: 1,
    type: "ApplicationEPStruct",
    access: "R V",
    conformance: "O",
    constraint: "desc",
    default: null,
    quality: "X"
  }),
  Command(
    {
      name: "LaunchApp",
      id: 0,
      access: "O",
      conformance: "M",
      direction: "request",
      response: "LauncherResponse"
    },
    Field({ name: "Application", id: 0, type: "ApplicationStruct", conformance: "AP", constraint: "desc" }),
    Field({ name: "Data", id: 1, type: "octstr", conformance: "O" })
  ),
  Command(
    { name: "StopApp", id: 1, access: "O", conformance: "M", direction: "request", response: "LauncherResponse" },
    Field({ name: "Application", id: 0, type: "ApplicationStruct", conformance: "AP", constraint: "desc" })
  ),
  Command(
    { name: "HideApp", id: 2, access: "O", conformance: "M", direction: "request", response: "LauncherResponse" },
    Field({ name: "Application", id: 0, type: "ApplicationStruct", conformance: "AP", constraint: "desc" })
  ),
  Command(
    { name: "LauncherResponse", id: 3, conformance: "M", direction: "response" },
    Field({ name: "Status", id: 0, type: "StatusEnum", conformance: "M" }),
    Field({ name: "Data", id: 1, type: "octstr", conformance: "O" })
  ),
  Datatype(
    { name: "StatusEnum", type: "enum8" },
    Field({ name: "Success", id: 0, conformance: "M" }),
    Field({ name: "AppNotAvailable", id: 1, conformance: "M" }),
    Field({ name: "SystemBusy", id: 2, conformance: "M" }),
    Field({ name: "PendingUserApproval", id: 3, conformance: "M" }),
    Field({ name: "Downloading", id: 4, conformance: "M" }),
    Field({ name: "Installing", id: 5, conformance: "M" })
  ),
  Datatype(
    { name: "ApplicationStruct", type: "struct" },
    Field({ name: "CatalogVendorId", id: 0, type: "uint16", conformance: "M" }),
    Field({ name: "ApplicationId", id: 1, type: "string", conformance: "M" })
  ),
  Datatype(
    { name: "ApplicationEPStruct", type: "struct" },
    Field({ name: "Application", id: 0, type: "ApplicationStruct", conformance: "M" }),
    Field({ name: "Endpoint", id: 1, type: "endpoint-no", conformance: "O" })
  )
);
MatterDefinition.children.push(ApplicationLauncher);
export {
  ApplicationLauncher
};
//# sourceMappingURL=application-launcher.element.js.map
