import { jsx as _jsx } from "react/jsx-runtime";
import { useEditContext } from "../client/editContext";
export function ApproveAndPublishButton() {
    const editContext = useEditContext();
    if (editContext?.user?.isLimitedPreviewUser)
        return null;
    return (_jsx("div", { className: "bg-theme-secondary hover:bg-theme-secondary/80 cursor-pointer rounded-l-full p-4 text-sm text-white", onClick: () => {
            const publishView = editContext?.configuration.editor.views?.find((x) => x.name === "publish");
            if (publishView)
                editContext?.switchWorkspace(publishView.name);
        }, children: "Approve & Publish" }));
}
//# sourceMappingURL=ApproveAndPublish.js.map