import DeleteOutlineIcon from "@mui/icons-material/DeleteOutlined"; import EditOutlinedIcon from "@mui/icons-material/EditOutlined"; import { Button, CircularProgress, IconButton, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Tooltip, Typography, } from "@mui/material"; import type { LocationListItem } from "@/domain/locations/types/location"; import { LocationsContactsCell } from "./locations-contacts-cell"; import { StateAreaCell } from "./state-area-cell"; interface LocationsTableProps { isLoading: boolean; onDelete: (row: LocationListItem) => void; onEdit: (row: LocationListItem) => void; rows: LocationListItem[]; } export function LocationsTable({ isLoading, onDelete, onEdit, rows }: LocationsTableProps) { return ( Location Name Address City State Phone Contact Status Actions {isLoading ? ( ) : rows.length === 0 ? ( No locations found ) : ( rows.map((row) => ( {row.address || "—"} {row.city || "—"} {row.phone || "—"} {row.status || "—"} onEdit(row)}> onDelete(row)} > )) )}
); }