import { FC } from "react";
import AppBarBackButton from "@/components/common/appbar-back-button.component";

interface AppBarProps {
    title: string;
    href?: string;
    disableBack?: boolean;
}

const AppBar: FC<AppBarProps> = ({ title, disableBack }) => {
    return (
        <header className="sticky top-0 z-50 bg-white border-b border-l border-r border-l-background border-r-background">
            <div className="flex items-center h-14 px-4 relative">

                {disableBack != true ? <AppBarBackButton /> : null}

                <h2 className="absolute left-1/2 -translate-x-1/2 text-sm font-semibold">
                    {title}
                </h2>

            </div>
        </header>
    );
};

export default AppBar;