import { CloseOutlined } from "@ant-design/icons"; import { Button, Drawer, Grid } from "antd"; import BackIcon from "components/Icons/BackIcon"; import NextIcon from "components/Icons/NextIcon"; import ProText from "components/ProText"; import { useState } from "react"; import { useGetMenuQuery } from "redux/api/others"; import { useAppSelector } from "redux/hooks"; import useHeaderMenu from "./hooks/useHeaderMenu"; import "./styles.css"; const { useBreakpoint } = Grid; export default function HeaderMenuDrawer() { const { isRTL, locale } = useAppSelector((state) => state.locale); const { themeName } = useAppSelector((state) => state.theme); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const { menuItems } = useHeaderMenu(); const { xs } = useBreakpoint(); const isMobile = xs; const closeMobileMenu = () => setMobileMenuOpen(false); const mobileMenuLinkStyle = (isActive: boolean): React.CSSProperties => ({ display: "flex", alignItems: "center", gap: 16, padding: "10px 20px", borderRadius: 12, fontSize: 14, fontWeight: isActive ? 600 : 400, marginBottom: 4, color: "#1f2937", }); const actionButtonStyle: React.CSSProperties = { height: 32, // isMobile ? 44 : 40, minWidth: 32, //isMobile ? 44 : "auto", width: 32, //isMobile ? 44 : "auto", borderRadius: 8, display: "flex", alignItems: "center", justifyContent: "center", gap: isMobile ? 0 : 8, backgroundColor: "none", }; const { restaurant } = useAppSelector((state) => state.order); const { isLoading: isLoadingMenu } = useGetMenuQuery( restaurant?.restautantId, { skip: !restaurant?.restautantId, }, ); return ( <> {!isLoadingMenu && (