import { z } from 'zod';
import { type InferProvider } from './capability-definition.js';
import { DeviceType } from '../device/device-type.js';
/**
 * Zone — pure geometry + identity. NO filtering behaviour.
 *
 * Zones describe **where** in the frame the operator wants to flag
 * something; consumer-owned {@link ZoneRule} arrays describe **how**
 * each pipeline stage uses them. Splitting the two means a single
 * polygon "Driveway" can simultaneously back a motion-exclude rule,
 * a detection-include rule on `['car']`, and an occupancy aggregate
 * — without three duplicated polygons.
 *
 * Owned by the orchestrator addon (provider) and mirrored into the
 * `zones` device-state slice on every mutation. Consumers
 * (motion-wasm, pipeline-executor, analytics, admin UI) read either
 * via `api.zones.listZones` (one-shot) or via `dev.state.zones` (live
 * mirror with `onChanged`).
 *
 * Coordinates are normalised fractions of the frame (0–1) so zones
 * survive resolution changes and stream profile switches.
 *
 * `kind` discriminates between full polygons (closed regions used
 * for intrusion / occupancy filters) and tripwires (open 2-point
 * line segments used for cross events). Onboard / firmware-reported
 * zones (Reolink, ONVIF) are out of scope for now — see the deferred
 * task list.
 */
export declare const ZoneKindEnum: z.ZodEnum<{
    polygon: "polygon";
    tripwire: "tripwire";
}>;
export type ZoneKind = z.infer<typeof ZoneKindEnum>;
/** Polygon vertex in fraction-of-frame coordinates (0–1). */
export declare const PolygonPointSchema: z.ZodObject<{
    x: z.ZodNumber;
    y: z.ZodNumber;
}, z.core.$strip>;
export type PolygonPoint = z.infer<typeof PolygonPointSchema>;
/** A camera detection zone — pure geometry/identity. */
export declare const ZoneSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    kind: z.ZodDefault<z.ZodEnum<{
        polygon: "polygon";
        tripwire: "tripwire";
    }>>;
    polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, z.core.$strip>>>;
    color: z.ZodDefault<z.ZodString>;
}, z.core.$strip>;
export type Zone = z.infer<typeof ZoneSchema>;
/**
 * Zones capability — per-camera CRUD over polygon detection zones.
 *
 * Provider lives in `addon-pipeline-orchestrator` (hub-only). Persists
 * to per-device settings and mirrors into the `zones` device-state
 * slice on every mutation, so downstream consumers can subscribe via
 * `dev.state.zones.onChanged`.
 *
 * The cap surface only handles geometry + identity; filtering
 * behaviour (per-class, include/exclude, threshold) lives in the
 * consumer addons' rule arrays — see `ZoneRuleSchema` exported from
 * `capabilities/schemas/zone-rule.js`.
 */
export declare const zonesCapability: {
    readonly name: "zones";
    readonly scope: "device";
    readonly mode: "singleton";
    readonly deviceTypes: readonly [DeviceType.Camera];
    readonly methods: {
        readonly listZones: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            kind: z.ZodDefault<z.ZodEnum<{
                polygon: "polygon";
                tripwire: "tripwire";
            }>>;
            polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, z.core.$strip>>>;
            color: z.ZodDefault<z.ZodString>;
        }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly addZone: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            zone: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                kind: z.ZodDefault<z.ZodEnum<{
                    polygon: "polygon";
                    tripwire: "tripwire";
                }>>;
                polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                    x: z.ZodNumber;
                    y: z.ZodNumber;
                }, z.core.$strip>>>;
                color: z.ZodDefault<z.ZodString>;
            }, z.core.$strip>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        readonly removeZone: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            zoneId: z.ZodString;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        readonly updateZone: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            zone: z.ZodObject<{
                id: z.ZodString;
                name: z.ZodString;
                kind: z.ZodDefault<z.ZodEnum<{
                    polygon: "polygon";
                    tripwire: "tripwire";
                }>>;
                polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                    x: z.ZodNumber;
                    y: z.ZodNumber;
                }, z.core.$strip>>>;
                color: z.ZodDefault<z.ZodString>;
            }, z.core.$strip>;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
    };
    /**
     * Runtime-state slice — the live zone catalogue mirrored by the
     * orchestrator on every CRUD mutation. Consumers read via
     * `device.state.zones.value` / `.watch(...)` without round-tripping
     * the cap, and the codegen DeviceProxy auto-wires the reactive
     * handle. Slice shape is `{ zones: Zone[] }` so future extensions
     * (e.g. zone groupings) can sit alongside the polygon list.
     */
    readonly runtimeState: z.ZodObject<{
        zones: z.ZodReadonly<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            kind: z.ZodDefault<z.ZodEnum<{
                polygon: "polygon";
                tripwire: "tripwire";
            }>>;
            polygon: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, z.core.$strip>>>;
            color: z.ZodDefault<z.ZodString>;
        }, z.core.$strip>>>;
    }, z.core.$strip>;
};
export type IZonesProvider = InferProvider<typeof zonesCapability>;
//# sourceMappingURL=zones.cap.d.ts.map