import PropTypes from 'prop-types' import { useState } from 'react' import { createPortal } from 'react-dom' import { Box, Dialog, DialogContent, DialogTitle, Tabs, Tab } from '@mui/material' import { tabsClasses } from '@mui/material/Tabs' import SpeechToText from '@/ui-component/extended/SpeechToText' import RateLimit from '@/ui-component/extended/RateLimit' import AllowedDomains from '@/ui-component/extended/AllowedDomains' import ChatFeedback from '@/ui-component/extended/ChatFeedback' import AnalyseFlow from '@/ui-component/extended/AnalyseFlow' import StarterPrompts from '@/ui-component/extended/StarterPrompts' import Leads from '@/ui-component/extended/Leads' import FollowUpPrompts from '@/ui-component/extended/FollowUpPrompts' const CHATFLOW_CONFIGURATION_TABS = [ { label: 'Rate Limiting', id: 'rateLimiting' }, { label: 'Starter Prompts', id: 'conversationStarters' }, { label: 'Follow-up Prompts', id: 'followUpPrompts' }, { label: 'Speech to Text', id: 'speechToText' }, { label: 'Chat Feedback', id: 'chatFeedback' }, { label: 'Allowed Domains', id: 'allowedDomains' }, { label: 'Analyse Chatflow', id: 'analyseChatflow' }, { label: 'Leads', id: 'leads' } ] function TabPanel(props) { const { children, value, index, ...other } = props return (