"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.DocDeclarations = void 0;

var _components = require("@looker/components");

var _react = _interopRequireDefault(require("react"));

var _DocCode = require("../DocCode");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var DocDeclarations = _ref => {
  var {
    declarations
  } = _ref;
  var tabs = (0, _components.useTabs)();
  return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_components.TabList, tabs, Object.keys(declarations).map(language => _react.default.createElement(_components.Tab, {
    key: language
  }, language))), _react.default.createElement(_components.TabPanels, _extends({}, tabs, {
    pt: "0"
  }), Object.entries(declarations).map(_ref2 => {
    var [language, code] = _ref2;
    return _react.default.createElement(_components.TabPanel, {
      key: language
    }, _react.default.createElement(_DocCode.DocCode, {
      language: language,
      code: code
    }));
  })));
};

exports.DocDeclarations = DocDeclarations;
//# sourceMappingURL=DocDeclarations.js.map