import { noop } from 'lodash' import { ChevronLeft, FlaskConical } from 'lucide-react' import { Button } from 'ui' import { POLICY_MODAL_VIEWS } from '../Policies.constants' import { DocsButton } from '@/components/ui/DocsButton' import { DOCS_URL } from '@/lib/constants' interface PolicyEditorModalTitleProps { view: string schema: string table: string isNewPolicy: boolean showAssistantPreview: boolean onSelectBackFromTemplates: () => void onToggleFeaturePreviewModal: () => void } const PolicyEditorModalTitle = ({ view, schema, table, isNewPolicy, showAssistantPreview, onSelectBackFromTemplates = noop, onToggleFeaturePreviewModal, }: PolicyEditorModalTitleProps) => { const getTitle = () => { if (view === POLICY_MODAL_VIEWS.EDITOR || view === POLICY_MODAL_VIEWS.SELECTION) { return `${isNewPolicy ? 'Adding new policy to' : 'Editing policy from'} ${schema}.${table}` } if (view === POLICY_MODAL_VIEWS.REVIEW) { return `Reviewing policy to be ${isNewPolicy ? 'created' : 'updated'} on ${schema}.${table}` } } if (view === POLICY_MODAL_VIEWS.TEMPLATES) { return (