import dayjs from 'dayjs' import { Input, SidePanel, TextArea } from 'ui' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import { FormSection, FormSectionContent, FormSectionLabel, } from '@/components/ui/Forms/FormSection' import { TIMESTAMP_MICROS_PER_MS, type AuditLog, } from '@/data/organizations/organization-audit-logs-query' interface LogDetailsPanelProps { selectedLog?: AuditLog onClose: () => void } export const LogDetailsPanel = ({ selectedLog, onClose }: LogDetailsPanelProps) => { const timestamp = selectedLog ? dayjs(selectedLog.timestamp / TIMESTAMP_MICROS_PER_MS).format('DD MMM YYYY, HH:mm:ss') : '' const timestampWithTz = selectedLog ? dayjs(selectedLog.timestamp / TIMESTAMP_MICROS_PER_MS).format('DD MMM YYYY, HH:mm:ss (ZZ)') : '' return ( General}> {selectedLog?.organization_slug && ( )} {selectedLog?.project_ref && ( )} Actor}> {selectedLog?.actor.email && ( )} {selectedLog?.actor.user_id && ( )} {selectedLog?.actor.ip && ( )} {selectedLog?.actor.oauth_app_name && ( )} {selectedLog?.actor.app_name && ( )} Action}> {selectedLog?.action.metadata && (