import React from 'react';
import { DbConnections, constants } from '../lib';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
const SettingsExample = () => {
  const dbSchema = JSON.parse(localStorage.getItem(constants.LS_KEY_DBS_SCHEMA) || '{}');
  if (dbSchema) {
    return /*#__PURE__*/_jsxs("div", {
      children: [/*#__PURE__*/_jsx("p", {
        children: "App will use this DB schema to render features."
      }), /*#__PURE__*/_jsx("pre", {
        style: {
          fontSize: 10
        },
        children: JSON.stringify(dbSchema, null, 2)
      })]
    });
  }
  return /*#__PURE__*/_jsxs("div", {
    children: [/*#__PURE__*/_jsx("p", {
      style: {
        color: 'red'
      },
      children: "No DB schema found, please create one."
    }), /*#__PURE__*/_jsx("div", {
      children: /*#__PURE__*/_jsx(DbConnections, {
        storage: {
          set: (k, v) => window.localStorage.setItem(k, v),
          get: k => window.localStorage.getItem(k)
        }
      })
    })]
  });
};
export default SettingsExample;
//# sourceMappingURL=DbConnectionsExample.js.map