import React from 'react';
import { Outlet, useParams } from 'react-router-dom';
import { ActionList } from './DbTablePageWrapper';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
function Table() {
  const params = useParams();
  if (!params.dbName) return /*#__PURE__*/_jsx("div", {
    children: "db name is required"
  });
  if (!params.tableName) return /*#__PURE__*/_jsx("div", {
    children: "table name is required"
  });
  return /*#__PURE__*/_jsxs("div", {
    children: [!params.action && /*#__PURE__*/_jsx(ActionList, {
      dbName: params.dbName,
      tableName: params.tableName
    }), /*#__PURE__*/_jsx(Outlet, {})]
  });
}
export default Table;
//# sourceMappingURL=Table.js.map