import { isEmpty, noop } from 'lodash' import { useState } from 'react' import { Button, Modal } from 'ui' import type { PolicyForReview } from './Policies.types' import SqlEditor from '@/components/ui/SqlEditor' interface PolicyReviewProps { policy: PolicyForReview onSelectBack: () => void onSelectSave: () => void } export const PolicyReview = ({ policy = {}, onSelectBack = noop, onSelectSave = noop, }: PolicyReviewProps) => { const [isSaving, setIsSaving] = useState(false) const onSavePolicy = () => { setIsSaving(true) onSelectSave() } let formattedSQLStatement = policy.statement || '' return ( <>

This is the SQL statement that will be used to create your policy.

{isEmpty(policy) ? (

There are no changes made to this policy

) : (
{policy.description}
)}
) }