import { useState } from 'react'; import { IoMdAdd, IoMdSettings } from 'react-icons/io'; import { DefaultModal } from '../../../../Components/Modal/DefaultModal'; import TooltipWrapper from '../../../../Components/Tooltip/Tooltip'; import './AllSalesPageSettings.scss'; import TableHeadersetting from './TableHeadersetting'; import PaymentOptions from '../../../Payment/PaymentOptions/PaymentOptions'; import PreferenceList from '../../../Preference/PreferenceList'; const AllSalesPageSettings = () => { const [settingModal, setsettingModal] = useState(false); const [selectedComponent, setselectedComponent] = useState('Payment'); const onclose = () => { setsettingModal(false); }; const ComponentSelect = (value) => { setselectedComponent(value); }; return ( <> setsettingModal(true)} style={{ cursor: 'pointer', display: 'flex', alignItems: 'center', gap: '5px', padding: '5px 10px', borderRadius: '4px', fontSize: '14px', backgroundColor: '#f0f0f0', }} > ComponentSelect('Payment')} > Payment Option ComponentSelect('Table')} > Table ComponentSelect('Preference')} > Preference {selectedComponent == 'Payment' && ( )} {selectedComponent === 'Table' && ( )} {selectedComponent === 'Preference' && ( )} > ); }; export default AllSalesPageSettings;