import type { ProtectionDeviceConfiguration } from "../models/protection-device.model.js"; import type { CircuitGroupCategory } from "../../shared/constants/circuit-group.js"; const defaultCircuitProtectionByCategory = { lighting: { type: "LS", ratedCurrentA: 10, tripCharacteristic: "B", }, single_phase: { type: "FI_LS", ratedCurrentA: 16, tripCharacteristic: "B", rcdType: "A", ratedResidualCurrentMa: 30, }, three_phase: { type: "FI_LS", ratedCurrentA: 16, tripCharacteristic: "B", rcdType: "A", ratedResidualCurrentMa: 30, }, } as const satisfies Record; const defaultGroupRcd = { type: "FI", ratedCurrentA: 40, rcdType: "A", ratedResidualCurrentMa: 30, } as const satisfies ProtectionDeviceConfiguration; export function createDefaultCircuitProtection( category: CircuitGroupCategory ): ProtectionDeviceConfiguration { return { ...defaultCircuitProtectionByCategory[category] }; } export function createDefaultGroupRcd(): ProtectionDeviceConfiguration { return { ...defaultGroupRcd }; }