import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Space, Typography } from 'antd';
import { LoadingOutlined, CheckCircleOutlined } from '@ant-design/icons';
import { useLivePreviewContext } from '../../hooks';
export function StatusIcon({ status, uploading }) {
    const statusMap = {
        loading: _jsx(LoadingOutlined, { spin: true }),
        inProgress: _jsx(LoadingOutlined, { spin: true }),
        running: _jsx(CheckCircleOutlined, {}),
    };
    return uploading ? statusMap.loading : statusMap[status] || statusMap.loading;
}
const LivePreviewBar = () => {
    const livePreviewContext = useLivePreviewContext();
    return (_jsxs(Space, { children: [_jsx(Typography.Text, { strong: true, children: "Live preview mode" }), _jsx(StatusIcon, { status: livePreviewContext?.statusLivePreview.status, uploading: livePreviewContext?.statusLivePreview.uploading }), _jsx(Typography.Text, { children: livePreviewContext?.statusLivePreview.deploymentUrl })] }));
};
export default LivePreviewBar;
//# sourceMappingURL=LivePreviewBar.js.map