import { jsx as _jsx } from "react/jsx-runtime";
import { useState } from 'react';
import { useEvents } from '../../../lib/seam/events/use-events.js';
import { NoiseSensorEventItem } from '../../../lib/ui/noise-sensor/NoiseSensorEventItem.js';
import { useNow } from '../../../lib/ui/use-now.js';
export function NoiseSensorActivityList({ device, }) {
    const now = useNow();
    const [mountedAt] = useState(now);
    const { events } = useEvents({
        device_id: device.device_id,
        event_type: 'noise_sensor.noise_threshold_triggered',
        since: mountedAt.minus({ months: 1 }).toString(),
    });
    return (_jsx("div", { className: 'seam-noise-sensor-activity-list', children: events?.map((event) => (_jsx(NoiseSensorEventItem, { event: event }, event.event_id))) }));
}
//# sourceMappingURL=NoiseSensorActivityList.js.map