import { ActionIcon, Group, Menu, Table, Text } from "@mantine/core"; import { IconDots, IconEdit, IconTrash } from "@tabler/icons-react"; import { useTranslation } from "react-i18next"; import { CustomAvatar } from "@/components/ui/custom-avatar.tsx"; import React from "react"; import NoTableResults from "@/components/common/no-table-results"; import { IScimToken } from "@/ee/scim/types/scim-token.types"; import { formatLocalized, useDateFnsLocale } from "@/lib/date-locale.ts"; interface ScimTokenTableProps { tokens: IScimToken[]; isLoading?: boolean; onUpdate?: (token: IScimToken) => void; onRevoke?: (token: IScimToken) => void; } export function ScimTokenTable({ tokens, isLoading, onUpdate, onRevoke, }: ScimTokenTableProps) { const { t } = useTranslation(); const locale = useDateFnsLocale(); const formatDate = (date: Date | string | null) => { if (!date) return t("Never"); return formatLocalized(date, "MMM dd, yyyy", "PP", locale); }; return (