/**
 * @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,
  EventElement as Event,
  CommandElement as Command,
  DatatypeElement as Datatype
} from "../../elements/index.js";
const ContentControl = Cluster(
  { name: "ContentControl", id: 1295, classification: "application" },
  Attribute({ name: "ClusterRevision", id: 65533, type: "ClusterRevision", default: 1 }),
  Attribute(
    { name: "FeatureMap", id: 65532, type: "FeatureMap" },
    Field({ name: "ST", constraint: "0", title: "ScreenTime" }),
    Field({ name: "PM", constraint: "1", title: "PinManagement" }),
    Field({ name: "BU", constraint: "2", title: "BlockUnrated" }),
    Field({ name: "OCR", constraint: "3", title: "OnDemandContentRating" }),
    Field({ name: "SCR", constraint: "4", title: "ScheduledContentRating" }),
    Field({ name: "BC", constraint: "5", title: "BlockChannels" }),
    Field({ name: "BA", constraint: "6", title: "BlockApplications" }),
    Field({ name: "BTW", constraint: "7", title: "BlockContentTimeWindow" })
  ),
  Attribute({ name: "Enabled", id: 0, type: "bool", access: "R V", conformance: "M" }),
  Attribute(
    { name: "OnDemandRatings", id: 1, type: "list", access: "R V", conformance: "OCR" },
    Field({ name: "entry", type: "RatingNameStruct" })
  ),
  Attribute({
    name: "OnDemandRatingThreshold",
    id: 2,
    type: "string",
    access: "R V",
    conformance: "OCR",
    constraint: "max 8"
  }),
  Attribute(
    { name: "ScheduledContentRatings", id: 3, type: "list", access: "R V", conformance: "SCR" },
    Field({ name: "entry", type: "RatingNameStruct" })
  ),
  Attribute({
    name: "ScheduledContentRatingThreshold",
    id: 4,
    type: "string",
    access: "R V",
    conformance: "SCR",
    constraint: "max 8"
  }),
  Attribute({ name: "ScreenDailyTime", id: 5, type: "elapsed-s", access: "R V", conformance: "ST", constraint: "max 86400" }),
  Attribute({
    name: "RemainingScreenTime",
    id: 6,
    type: "elapsed-s",
    access: "R V",
    conformance: "ST",
    constraint: "max 86400"
  }),
  Attribute({ name: "BlockUnrated", id: 7, type: "bool", access: "R V", conformance: "BU" }),
  Attribute(
    { name: "BlockChannelList", id: 8, type: "list", access: "R V", conformance: "BC" },
    Field({ name: "entry", type: "BlockChannelStruct" })
  ),
  Attribute(
    { name: "BlockApplicationList", id: 9, type: "list", access: "R V", conformance: "BA" },
    Field({ name: "entry", type: "AppInfoStruct" })
  ),
  Attribute(
    {
      name: "BlockContentTimeWindow",
      id: 10,
      type: "list",
      access: "R V",
      conformance: "BTW",
      constraint: "max 7"
    },
    Field({ name: "entry", type: "TimeWindowStruct" })
  ),
  Event({ name: "RemainingScreenTimeExpired", id: 0, access: "V", conformance: "ST", priority: "info" }),
  Event({ name: "EnteringBlockContentTimeWindow", id: 1, access: "V", conformance: "BTW", priority: "info" }),
  Command(
    { name: "UpdatePin", id: 0, access: "M T", conformance: "PM", direction: "request", response: "status" },
    Field({ name: "OldPin", id: 0, type: "string", conformance: "M", constraint: "max 6" }),
    Field({ name: "NewPin", id: 1, type: "string", conformance: "M", constraint: "max 6" })
  ),
  Command({ name: "ResetPin", id: 1, access: "A T", conformance: "PM", direction: "request", response: "ResetPinResponse" }),
  Command(
    { name: "ResetPinResponse", id: 2, conformance: "PM", direction: "response" },
    Field({ name: "PinCode", id: 0, type: "string", conformance: "M", constraint: "max 6" })
  ),
  Command({ name: "Enable", id: 3, access: "M T", conformance: "M", direction: "request", response: "status" }),
  Command({ name: "Disable", id: 4, access: "M T", conformance: "M", direction: "request", response: "status" }),
  Command(
    { name: "AddBonusTime", id: 5, access: "O", conformance: "ST", direction: "request", response: "status" },
    Field({ name: "PinCode", id: 0, type: "string", conformance: "O", constraint: "max 6" }),
    Field({ name: "BonusTime", id: 1, type: "elapsed-s", conformance: "M", constraint: "desc", default: 300 })
  ),
  Command(
    {
      name: "SetScreenDailyTime",
      id: 6,
      access: "M",
      conformance: "ST",
      direction: "request",
      response: "status"
    },
    Field({ name: "ScreenTime", id: 0, type: "elapsed-s", conformance: "M", constraint: "max 86400" })
  ),
  Command({ name: "BlockUnratedContent", id: 7, access: "M", conformance: "BU", direction: "request", response: "status" }),
  Command({
    name: "UnblockUnratedContent",
    id: 8,
    access: "M",
    conformance: "BU",
    direction: "request",
    response: "status"
  }),
  Command(
    {
      name: "SetOnDemandRatingThreshold",
      id: 9,
      access: "M",
      conformance: "OCR",
      direction: "request",
      response: "status"
    },
    Field({ name: "Rating", id: 0, type: "string", conformance: "M", constraint: "max 8" })
  ),
  Command(
    {
      name: "SetScheduledContentRatingThreshold",
      id: 10,
      access: "M",
      conformance: "SCR",
      direction: "request",
      response: "status"
    },
    Field({ name: "Rating", id: 0, type: "string", conformance: "M", constraint: "max 8" })
  ),
  Command(
    { name: "AddBlockChannels", id: 11, access: "M", conformance: "BC", direction: "request", response: "status" },
    Field(
      { name: "Channels", id: 0, type: "list", conformance: "M" },
      Field({ name: "entry", type: "BlockChannelStruct" })
    )
  ),
  Command(
    {
      name: "RemoveBlockChannels",
      id: 12,
      access: "M",
      conformance: "BC",
      direction: "request",
      response: "status"
    },
    Field(
      { name: "ChannelIndexes", id: 0, type: "list", conformance: "M" },
      Field({ name: "entry", type: "uint16" })
    )
  ),
  Command(
    {
      name: "AddBlockApplications",
      id: 13,
      access: "M",
      conformance: "BA",
      direction: "request",
      response: "status"
    },
    Field(
      { name: "Applications", id: 0, type: "list", conformance: "M" },
      Field({ name: "entry", type: "AppInfoStruct" })
    )
  ),
  Command(
    {
      name: "RemoveBlockApplications",
      id: 14,
      access: "M",
      conformance: "BA",
      direction: "request",
      response: "status"
    },
    Field(
      { name: "Applications", id: 0, type: "list", conformance: "M" },
      Field({ name: "entry", type: "AppInfoStruct" })
    )
  ),
  Command(
    {
      name: "SetBlockContentTimeWindow",
      id: 15,
      access: "M",
      conformance: "BTW",
      direction: "request",
      response: "status"
    },
    Field({ name: "TimeWindow", id: 0, type: "TimeWindowStruct", conformance: "M" })
  ),
  Command(
    {
      name: "RemoveBlockContentTimeWindow",
      id: 16,
      access: "M",
      conformance: "BTW",
      direction: "request",
      response: "status"
    },
    Field(
      { name: "TimeWindowIndexes", id: 0, type: "list", conformance: "M" },
      Field({ name: "entry", type: "uint16" })
    )
  ),
  Datatype(
    { name: "DayOfWeekBitmap", type: "map8" },
    Field({ name: "Sunday", constraint: "0" }),
    Field({ name: "Monday", constraint: "1" }),
    Field({ name: "Tuesday", constraint: "2" }),
    Field({ name: "Wednesday", constraint: "3" }),
    Field({ name: "Thursday", constraint: "4" }),
    Field({ name: "Friday", constraint: "5" }),
    Field({ name: "Saturday", constraint: "6" })
  ),
  Datatype(
    { name: "RatingNameStruct", type: "struct" },
    Field({ name: "RatingName", id: 0, type: "string", conformance: "M", constraint: "max 8" }),
    Field({ name: "RatingNameDesc", id: 1, type: "string", conformance: "O", constraint: "max 64" })
  ),
  Datatype(
    { name: "BlockChannelStruct", type: "struct" },
    Field({ name: "BlockChannelIndex", id: 0, type: "uint16", conformance: "M", quality: "X" }),
    Field({ name: "MajorNumber", id: 1, type: "uint16", conformance: "M" }),
    Field({ name: "MinorNumber", id: 2, type: "uint16", conformance: "M" }),
    Field({ name: "Identifier", id: 3, type: "string", conformance: "O" })
  ),
  Datatype(
    { name: "AppInfoStruct", type: "struct" },
    Field({ name: "CatalogVendorId", id: 0, type: "uint16", conformance: "M" }),
    Field({ name: "ApplicationId", id: 1, type: "string", conformance: "M" })
  ),
  Datatype(
    { name: "TimeWindowStruct", type: "struct" },
    Field({ name: "TimeWindowIndex", id: 0, type: "uint16", conformance: "M", quality: "X" }),
    Field({ name: "DayOfWeek", id: 1, type: "DayOfWeekBitmap", conformance: "M", constraint: "desc" }),
    Field(
      { name: "TimePeriod", id: 2, type: "list", conformance: "M", constraint: "desc" },
      Field({ name: "entry", type: "TimePeriodStruct" })
    )
  ),
  Datatype(
    { name: "TimePeriodStruct", type: "struct" },
    Field({ name: "StartHour", id: 0, type: "uint8", conformance: "M", constraint: "0 to 23" }),
    Field({ name: "StartMinute", id: 1, type: "uint8", conformance: "M", constraint: "0 to 59" }),
    Field({ name: "EndHour", id: 2, type: "uint8", conformance: "M", constraint: "0 to 23" }),
    Field({ name: "EndMinute", id: 3, type: "uint8", conformance: "M", constraint: "0 to 59" })
  ),
  Datatype(
    { name: "StatusCodeEnum", type: "enum8" },
    Field({ name: "InvalidPinCode", id: 2 }),
    Field({ name: "InvalidRating", id: 3 }),
    Field({ name: "InvalidChannel", id: 4 }),
    Field({ name: "ChannelAlreadyExist", id: 5 }),
    Field({ name: "ChannelNotExist", id: 6 }),
    Field({ name: "UnidentifiableApplication", id: 7 }),
    Field({ name: "ApplicationAlreadyExist", id: 8 }),
    Field({ name: "ApplicationNotExist", id: 9 }),
    Field({ name: "TimeWindowAlreadyExist", id: 10 }),
    Field({ name: "TimeWindowNotExist", id: 11 })
  )
);
MatterDefinition.children.push(ContentControl);
export {
  ContentControl
};
//# sourceMappingURL=content-control.element.js.map
