import Add from "@mui/icons-material/Add";
import { Button } from "@/shared/ui/Button.jsx";
import { PageHead } from "@/shared/ui/PageHead.jsx";

export function RoleToolbar({ canCreate, onCreate }) {
  return (
    <PageHead title="角色配置">
      {canCreate ? (
        <Button variant="primary" onClick={onCreate}>
          <Add fontSize="small" />
          新增角色
        </Button>
      ) : null}
    </PageHead>
  );
}
