import Add from "@mui/icons-material/Add"; import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Grid, useMediaQuery } from "@mui/material"; import { getLocalizedString } from "@olenbetong/appframe-core"; import { theme } from "@olenbetong/appframe-mui"; import type { DamagesRecord } from "../../data"; import { ElementDamagesHeader, ElementDamagesItem } from "./DesktopView"; import { DuplicatePhoneViewItem } from "./PhoneView"; type DuplicateElementDamageDialogProps = { open: boolean; onClose: () => void; record: DamagesRecord[]; onRegisterAnyway: () => void; loading: boolean; linkToDamage: boolean; }; export function DuplicateElementDamageDialog({ open, onClose, record, onRegisterAnyway, loading, linkToDamage, }: DuplicateElementDamageDialogProps) { let matches = useMediaQuery(theme.breakpoints.up("lg")); let backgroundColor = "#e9ebee"; return ( {getLocalizedString("This element has one or more unfixed registered damage")} {matches ? ( <> {record.map((record) => ( ))} ) : (
{record.map((record) => ( ))}
)}
); }