import { z } from 'zod';
import { type InferProvider } from './capability-definition.js';
import { DeviceType } from '../device/device-type.js';
/**
 * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
 * cap so a single CRUD surface backs every consumer; each stage has
 * its own dev-state mirror slice (`motion-zone-rules`,
 * `detection-zone-rules`, …) so consumer addons subscribe independently.
 *
 * Extend the enum here when a new gating consumer comes online (audio
 * gating, alert filtering, …) — no other surface needs to change.
 */
export declare const ZoneRuleStageEnum: z.ZodEnum<{
    motion: "motion";
    detection: "detection";
}>;
export type ZoneRuleStage = z.infer<typeof ZoneRuleStageEnum>;
/**
 * Zone rules capability — per-camera CRUD over the {@link ZoneRule}
 * arrays that decide how each pipeline stage uses the polygon zones.
 *
 * Hosted by `addon-pipeline-orchestrator` alongside the zones provider
 * so the operator has a single hub-side source of truth for both
 * geometry and behaviour. Per-stage rules are stored under the
 * `zoneRules.<stage>` key in the orchestrator's per-device store and
 * mirrored to the device-state slice `<stage>-zone-rules` on every
 * mutation; consumer addons (analytics, motion-wasm, pipeline-executor)
 * subscribe to that slice and refresh their gating without
 * round-tripping the cap.
 *
 * Sets are bulk-replace — the operator UI sends the new rule list
 * wholesale, so reordering / batch enable-toggle / drag-drop CRUD lives
 * naturally in the rule editor without per-rule mutation chatter.
 */
export declare const zoneRulesCapability: {
    readonly name: "zone-rules";
    readonly scope: "device";
    readonly mode: "singleton";
    readonly deviceTypes: readonly [DeviceType.Camera];
    readonly methods: {
        /** Read the full rule list for a given stage (empty when no rules
         *  are defined yet). */
        readonly listRules: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            stage: z.ZodEnum<{
                motion: "motion";
                detection: "detection";
            }>;
        }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodOptional<z.ZodString>;
            zoneIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
            mode: z.ZodEnum<{
                include: "include";
                exclude: "exclude";
            }>;
            classFilter: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
            overlapThreshold: z.ZodOptional<z.ZodNumber>;
            bboxInclusionPct: z.ZodOptional<z.ZodNumber>;
            preferMask: z.ZodOptional<z.ZodBoolean>;
            enabled: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Bulk-replace the rule list for one stage. The provider validates
         *  each entry against {@link ZoneRuleSchema} (zoneIds non-empty,
         *  thresholds in range) and rejects the whole patch if any entry
         *  is invalid — partial writes are a configuration footgun. */
        readonly setRules: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            stage: z.ZodEnum<{
                motion: "motion";
                detection: "detection";
            }>;
            rules: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                name: z.ZodOptional<z.ZodString>;
                zoneIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
                mode: z.ZodEnum<{
                    include: "include";
                    exclude: "exclude";
                }>;
                classFilter: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
                overlapThreshold: z.ZodOptional<z.ZodNumber>;
                bboxInclusionPct: z.ZodOptional<z.ZodNumber>;
                preferMask: z.ZodOptional<z.ZodBoolean>;
                enabled: z.ZodDefault<z.ZodBoolean>;
            }, z.core.$strip>>>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
    };
    /**
     * Runtime-state slice — both stages mirrored together so consumers
     * see one reactive handle (`device.state.zoneRules.value`) instead
     * of two. Bulk-replace mutations on either stage write the full
     * `{motion, detection}` shape, so subscribers always get the
     * complete current set. Consumers that only care about one stage
     * just read the matching property.
     */
    readonly runtimeState: z.ZodObject<{
        motion: z.ZodReadonly<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodOptional<z.ZodString>;
            zoneIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
            mode: z.ZodEnum<{
                include: "include";
                exclude: "exclude";
            }>;
            classFilter: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
            overlapThreshold: z.ZodOptional<z.ZodNumber>;
            bboxInclusionPct: z.ZodOptional<z.ZodNumber>;
            preferMask: z.ZodOptional<z.ZodBoolean>;
            enabled: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>>;
        detection: z.ZodReadonly<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodOptional<z.ZodString>;
            zoneIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
            mode: z.ZodEnum<{
                include: "include";
                exclude: "exclude";
            }>;
            classFilter: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
            overlapThreshold: z.ZodOptional<z.ZodNumber>;
            bboxInclusionPct: z.ZodOptional<z.ZodNumber>;
            preferMask: z.ZodOptional<z.ZodBoolean>;
            enabled: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>>;
    }, z.core.$strip>;
};
export type IZoneRulesProvider = InferProvider<typeof zoneRulesCapability>;
//# sourceMappingURL=zone-rules.cap.d.ts.map