flowstudio
Version:
Enterprise Flow Designer
46 lines • 3.64 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button, Card, Flex, SegmentedControl, TextField, Select } from "@radix-ui/themes";
// import { IoIosCog } from "react-icons/io";
// import NextLink from 'next/link'
// import DataSources from "./app_settings/data_sources";
// import ServiceProviders from "./app_settings/service_providers";
// import Simulator from "./app_settings/simulator";
// import Deploy from "./app_settings/deploy";
// import { FaDatabase } from "react-icons/fa";
// import Link from "next/link";
import { useState } from "react";
import { useConfigStore } from "../zustand/store";
import AppSettings from "./app_settings";
import { IoSave } from "react-icons/io5";
const DockPanel = ({ projectIdentifier }) => {
const [dataSourcesOpen, setDataSourcesOpen] = useState(false);
const [serviceProvidersOpen, setServiceProvidersOpen] = useState(false);
const [simulatorOpen, setSimulatorOpen] = useState(false);
const [deployOpen, setDeployOpen] = useState(false);
const { stateType, setStateType } = useConfigStore();
// const { isOpen: isFunctionsDrawerOpen, onOpen: onFunctionsDrawerOpen, onClose: onFunctionsDrawerClose } = useDisclosure()
// const { isOpen: isServiceProvidersDrawerOpen, onOpen: onServiceProvidersDrawerOpen, onClose: onServiceProvidersDrawerClose } = useDisclosure()
// const { isOpen: isSimulatorDrawerOpen, onOpen: onSimulatorDrawerOpen, onClose: onSimulatorDrawerClose } = useDisclosure()
// const { isOpen: isDeployModalOpen, onOpen: onDeployModalOpen, onClose: onDeployModalClose } = useDisclosure()
// const { data: project, status: projectStatus } = useQuery({
// queryKey: [`project_${projectIdentifier}`, projectIdentifier],
// queryFn: async () => {
// const res = await fetch(`/api/projects/${projectIdentifier}`);
// return res?.ok ? res.json() : [];
// },
// ...{ enabled: !!projectIdentifier },
// });
const apps = [
{ id: 1, name: 'My Voting App' },
{ id: 2, name: 'E-Commerce App' },
{ id: 3, name: 'Social Media App' },
{ id: 4, name: 'E-Learning App' },
{ id: 5, name: 'Medical App' },
{ id: 6, name: 'Finance App' },
{ id: 7, name: 'Chat App' },
];
const app = { name: 'My Voting App' };
return (_jsx(Card, { size: '1', style: { padding: 5, '--card-border-radius': '5px' }, children: _jsxs(Flex, { gap: '2', children: [_jsxs(Select.Root, { size: '1', children: [_jsx(Select.Trigger, { placeholder: "Select Project" }), _jsx(Select.Content, { position: 'popper', children: apps === null || apps === void 0 ? void 0 : apps.map((val, ind) => (_jsx(Select.Item, { value: val.id, children: val.name }, val.id || ind))) })] }), _jsx(TextField.Root, { placeholder: "App Name", defaultValue: (app === null || app === void 0 ? void 0 : app.name) || '', size: '1', children: _jsx(TextField.Slot, { side: 'right', pr: '1', children: _jsx(Button, { size: '1', variant: 'soft', style: { padding: '0 4px', height: '17px' }, children: _jsx(IoSave, {}) }) }) }), _jsxs(SegmentedControl.Root, { defaultValue: "design", variant: 'classic', size: '1', children: [_jsx(SegmentedControl.Item, { onClick: () => setStateType('design'), value: "design", children: "Design" }), _jsx(SegmentedControl.Item, { onClick: () => setStateType('simulate'), value: "simulate", children: "Simulate" }), _jsx(SegmentedControl.Item, { onClick: () => setStateType('analyze'), value: "analyze", children: "Analyze" })] }), _jsx(AppSettings, {})] }) }));
};
export default DockPanel;
//# sourceMappingURL=dock_panel.js.map