/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Bytes } from "#general";
import { VendorId } from "../datatype/VendorId.js";
import { TlvSchema } from "../tlv/TlvSchema.js";
import { BitField, BitFieldEnum, BitFlag, TypeFromBitmapSchema } from "./BitmapSchema.js";
import { Schema } from "./Schema.js";
/** See {@link MatterSpecification.v142.Core} §5.1.3.2. */
export declare const MATTER_QR_CODE_SINGLE_PAYLOAD_MAX_LENGTH = 255;
/** See {@link MatterSpecification.v142.Core} §5.1.3.2. */
export declare const MATTER_QR_CODE_ALL_PAYLOAD_MAX_LENGTH = 4296;
/** See {@link MatterSpecification.v13.Core} § 5.1.3.1 Table 38 */
export declare enum CommissioningFlowType {
    /** When not commissioned, the device always enters commissioning mode upon power-up. */
    Standard = 0,
    /** User action required to enter commissioning mode. */
    UserIntent = 1,
    /** Interaction with a vendor-specified means is needed before commissioning. */
    Custom = 2
}
/** See {@link MatterSpecification.v13.Core} § 5.1.3.1 Table 39 */
export declare const DiscoveryCapabilitiesBitmap: {
    /**
     * BLE
     * * Set when device supports BLE for discovery when not commissioned.
     * * Not-Set when device does not support BLE for discovery or is currently commissioned into one or more fabrics.
     */
    ble: BitFlag;
    /**
     * On the IP network
     * * Set when device is already on the IP network.
     */
    onIpNetwork: BitFlag;
    /**
     * Wi-Fi Public Action Frame
     * * Set when device supports Wi-Fi Public Action Frame for discovery when not commissioned.
     * * Not-Set when device does not support Wi-Fi Public Action Frame for discovery or is currently commissioned into
     *   one or more fabrics.
     */
    wifiPublicActionFrame: BitFlag;
};
export declare const DiscoveryCapabilitiesSchema: import("./BitmapSchema.js").BitmapSchemaInternal<{
    /**
     * BLE
     * * Set when device supports BLE for discovery when not commissioned.
     * * Not-Set when device does not support BLE for discovery or is currently commissioned into one or more fabrics.
     */
    ble: BitFlag;
    /**
     * On the IP network
     * * Set when device is already on the IP network.
     */
    onIpNetwork: BitFlag;
    /**
     * Wi-Fi Public Action Frame
     * * Set when device supports Wi-Fi Public Action Frame for discovery when not commissioned.
     * * Not-Set when device does not support Wi-Fi Public Action Frame for discovery or is currently commissioned into
     *   one or more fabrics.
     */
    wifiPublicActionFrame: BitFlag;
}>;
/** See {@link MatterSpecification.v13.Core} § 5.1.3.1 Table 38 */
declare const QrCodeDataSchema: import("./BitmapSchema.js").ByteArrayBitmapSchemaInternal<{
    version: BitField;
    vendorId: BitField;
    productId: BitField;
    flowType: BitFieldEnum<CommissioningFlowType>;
    discoveryCapabilities: BitField;
    discriminator: BitField;
    passcode: BitField;
}>;
export type QrCodeData = TypeFromBitmapSchema<typeof QrCodeDataSchema> & {
    /**
     * See {@link MatterSpecification.v13.Core} § 5.1.5
     * Variable length TLV data. Zero length if TLV is not included. This data is byte-aligned.
     * All elements SHALL be housed within an anonymous top-level structure container.
     */
    tlvData?: Bytes;
};
/**
 * Default field definition that can be enhanced with manufacturer specific Fields for the TlvSchema to use.
 * See {@link MatterSpecification.v13.Core} § 5.1.5
 */
export declare const QrCodeTlvDataDefaultFields: {
    /** Device Serial # */
    serialNumber: import("../tlv/TlvObject.js").OptionalFieldType<import("../tlv/TlvSchema.js").TlvStream>;
    pbkdfIterations: import("../tlv/TlvObject.js").OptionalFieldType<number>;
    pbkdfSalt: import("../tlv/TlvObject.js").OptionalFieldType<AllowSharedBufferSource>;
    /**
     * Number of devices that are expected to be onboarded using this payload when using the Enhanced Commissioning
     * Method
     */
    numberOfDevices: import("../tlv/TlvObject.js").OptionalFieldType<number>;
    /**
     * Time, in seconds, during which the device(s) are expected to be commissionable using the Enhanced Commissioning
     * Method
     */
    commissioningTimeout: import("../tlv/TlvObject.js").OptionalFieldType<number>;
};
declare class QrPairingCodeSchema extends Schema<QrCodeData[], string> {
    protected encodeInternal(payloadData: QrCodeData[]): string;
    protected decodeInternal(encoded: string): QrCodeData[];
    /**
     * Decodes the TLV data from the QR code payload.
     * This method especially also handles that an encoded serialNumber can be UTF-8-String or a Unsigned Integer.
     *
     * @param data Encoded TLV data
     * @param schema The schema to use for decoding the TLV data, by default a schema with the QrCodeTlvDataDefaultFields is used
     */
    decodeTlvData(data: Bytes, schema?: TlvSchema<any>): any;
    /**
     * Encodes the TLV data for the QR code payload.
     * This method especially also handles that an encoded serialNumber can be UTF-8-String or a Unsigned Integer.
     *
     * @param data Data object to encode
     * @param schema The schema to use for encoding the TLV data, by default a schema with the QrCodeTlvDataDefaultFields is used
     */
    encodeTlvData(data: Record<string, any>, schema?: TlvSchema<any>): AllowSharedBufferSource;
}
export declare const QrPairingCodeCodec: QrPairingCodeSchema;
export type ManualPairingData = {
    discriminator?: number;
    shortDiscriminator?: number;
    passcode: number;
    vendorId?: VendorId;
    productId?: number;
};
/** See {@link MatterSpecification.v10.Core} § 5.1.4.1 Table 38/39/40 */
declare class ManualPairingCodeSchema extends Schema<ManualPairingData, string> {
    protected encodeInternal({ discriminator, passcode, vendorId, productId }: ManualPairingData): string;
    protected decodeInternal(encoded: string): ManualPairingData;
}
export declare const ManualPairingCodeCodec: ManualPairingCodeSchema;
export {};
//# sourceMappingURL=PairingCodeSchema.d.ts.map