import { SmartAlarmAbility } from '../abilities'; type CustomAlarmResult = { /** * 设备自定义的告警列表信息 */ data: SmartAlarmAbility['customAlarmList']; /** * 设备自定义的告警列表信息是否正在加载中 */ loading: boolean; /** * 根据设备 id 查询该设备自定义的告警列表信息 */ getCustomAlarmList: SmartAlarmAbility['getCustomAlarmList']; /** * 新增或编辑自定义的告警规则 */ addCustomAlarm: SmartAlarmAbility['addCustomAlarm']; /** * 启用或禁用自定义的告警规则 */ setCustomAlarmStatus: SmartAlarmAbility['setCustomAlarmStatus']; /** * 删除自定义的告警规则 */ deleteCustomAlarm: SmartAlarmAbility['deleteCustomAlarm']; }; /** * 获取设备自定义告警列表与增删改查操作,仅支持单设备,不支持群组环境。 * @public * @since @ray-js/panel-sdk 1.0.0 * @returns 自定义告警数据、加载状态及管理方法 * @typeOverride returns CustomAlarmResult * @remarks * 使用前需同时满足两个条件: * 1. 项目已挂载 SdmProvider * 2. SmartDeviceModel 初始化时已配置 SmartAlarmAbility * @example * ```tsx * import { useCustomAlarm } from '@ray-js/panel-sdk'; * * function AlarmPage() { * const { data, loading, getCustomAlarmList, setCustomAlarmStatus } = useCustomAlarm(); * * React.useEffect(() => { * getCustomAlarmList(); * }, []); * * const handleToggle = (item) => (value) => { * setCustomAlarmStatus({ bindId: item.bindId, enable: value }); * }; * * return data.map(item => ( * * )); * } * ``` */ export declare function useCustomAlarm(): CustomAlarmResult; export {};