import { type FC, type PropsWithChildren, useEffect } from "react"; import { ScrollArea, Sheet, SheetContent, SheetHeader, SheetTitle, } from "@marzneshin/common/components"; import { useTranslation } from "react-i18next"; export interface SettingsDialogProps { onOpenChange: (state: boolean) => void; open: boolean; onClose?: () => void; } export const SettingsDialog: FC = ({ open, onOpenChange, children, onClose = () => null, }) => { const { t } = useTranslation(); useEffect(() => { if (!open) onClose(); }, [open, onClose]); return ( {t("settings")} {children} ); };