import type { ReactNode } from "react";
import Box from "@mui/material/Box";

export interface FilterBarProps {
  children: ReactNode;
}

/**
 * Flex row wrapper for filter controls — replaces admin-search-bar/admin-form-row-N.
 * Children size themselves; callers wrap individual controls in a Box with width.
 */
export default function FilterBar({ children }: FilterBarProps) {
  return (
    <Box
      sx={{
        display: "flex",
        flexWrap: "wrap",
        gap: 1.5,
        alignItems: "flex-end",
        mb: 2,
      }}
    >
      {children}
    </Box>
  );
}
