"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 MdnsConsts_exports = {};
__export(MdnsConsts_exports, {
  DEFAULT_PAIRING_HINT: () => DEFAULT_PAIRING_HINT,
  MATTER_COMMISSIONER_SERVICE_QNAME: () => MATTER_COMMISSIONER_SERVICE_QNAME,
  MATTER_COMMISSION_SERVICE_QNAME: () => MATTER_COMMISSION_SERVICE_QNAME,
  MATTER_SERVICE_QNAME: () => MATTER_SERVICE_QNAME,
  PAIRING_HINTS_REQUIRING_INSTRUCTION: () => PAIRING_HINTS_REQUIRING_INSTRUCTION,
  SERVICE_DISCOVERY_QNAME: () => SERVICE_DISCOVERY_QNAME,
  getCommissionableDeviceQname: () => getCommissionableDeviceQname,
  getCommissionerDeviceQname: () => getCommissionerDeviceQname,
  getCommissioningModeQname: () => getCommissioningModeQname,
  getDeviceTypeQname: () => getDeviceTypeQname,
  getFabricQname: () => getFabricQname,
  getLongDiscriminatorQname: () => getLongDiscriminatorQname,
  getOperationalDeviceQname: () => getOperationalDeviceQname,
  getShortDiscriminatorQname: () => getShortDiscriminatorQname,
  getVendorQname: () => getVendorQname
});
module.exports = __toCommonJS(MdnsConsts_exports);
var import_types = require("#types");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const SERVICE_DISCOVERY_QNAME = "_services._dns-sd._udp.local";
const MATTER_COMMISSION_SERVICE_QNAME = "_matterc._udp.local";
const MATTER_COMMISSIONER_SERVICE_QNAME = "_matterd._udp.local";
const MATTER_SERVICE_QNAME = "_matter._tcp.local";
const DEFAULT_PAIRING_HINT = {
  powerCycle: true,
  deviceManual: true
};
const PAIRING_HINTS_REQUIRING_INSTRUCTION = Array(
  "customInstruction",
  "pressResetButtonForNumberOfSeconds",
  "pressResetButtonUntilLightBlinks",
  "pressResetButtonForNumberOfSecondsWithApplicationOfPower",
  "pressResetButtonUntilLightBlinksWithApplicationOfPower",
  "pressResetButtonNumberOfTimes",
  "pressSetupButtonForNumberOfSeconds",
  "pressSetupButtonUntilLightBlinks",
  "pressSetupButtonForNumberOfSecondsWithApplicationOfPower",
  "pressSetupButtonUntilLightBlinksWithApplicationOfPower",
  "pressSetupButtonNumberOfTimes"
);
const getFabricQname = (fabric) => `_I${import_types.GlobalFabricId.strOf(fabric).toUpperCase()}._sub.${MATTER_SERVICE_QNAME}`;
const getOperationalDeviceQname = (fabric, node) => `${import_types.GlobalFabricId.strOf(fabric).toUpperCase()}-${import_types.NodeId.strOf(node).toUpperCase()}.${MATTER_SERVICE_QNAME}`;
const getVendorQname = (vendorId) => `_V${vendorId}._sub.${MATTER_COMMISSION_SERVICE_QNAME}`;
const getDeviceTypeQname = (deviceType) => `_T${deviceType}._sub.${MATTER_COMMISSION_SERVICE_QNAME}`;
const getShortDiscriminatorQname = (shortDiscriminator) => `_S${shortDiscriminator}._sub.${MATTER_COMMISSION_SERVICE_QNAME}`;
const getLongDiscriminatorQname = (longDiscriminator) => `_L${longDiscriminator}._sub.${MATTER_COMMISSION_SERVICE_QNAME}`;
const getCommissioningModeQname = () => `_CM._sub.${MATTER_COMMISSION_SERVICE_QNAME}`;
const getCommissionableDeviceQname = (instanceId) => `${instanceId}.${MATTER_COMMISSION_SERVICE_QNAME}`;
const getCommissionerDeviceQname = (instanceId) => `${instanceId}.${MATTER_COMMISSIONER_SERVICE_QNAME}`;
//# sourceMappingURL=MdnsConsts.js.map
