import { FlexWrapper } from "@ente/shared/components/Container"; import ArrowBack from "@mui/icons-material/ArrowBack"; import Close from "@mui/icons-material/Close"; import { Box, IconButton, Typography } from "@mui/material"; import React from "react"; interface TitlebarProps { title: string; caption?: string; onClose: () => void; backIsClose?: boolean; onRootClose?: () => void; actionButton?: JSX.Element; } export const Titlebar: React.FC = ({ title, caption, onClose, backIsClose, actionButton, onRootClose, }) => { return ( <> {backIsClose ? : } {actionButton && actionButton} {!backIsClose && ( )} {title} {caption} ); };