import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/esm/taggedTemplateLiteralLoose";
var _excluded = ["children", "className"],
  _excluded2 = ["children", "className"],
  _excluded3 = ["children", "className"],
  _excluded4 = ["children", "className"],
  _excluded5 = ["children", "className"],
  _excluded6 = ["children", "className"];
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
import React from 'react';
import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
var line = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n  display: flex;\n  align-items: baseline;\n  margin-bottom: 10px;\n"])));
var title = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n  box-sizing: border-box;\n  margin-right: 10px;\n  width: 150px;\n  text-align: right;\n"])));
var content = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n  display: inline-flex;\n"])));
var formLineBreak = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n  height: 20px;\n"])));
var actionsBar = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n  margin-top: 10px;\n  padding-left: 160px;\n"])));
var formWrapper = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n  display: flex;\n  flex-direction: column;\n"])));
var FormLine = function FormLine(_ref) {
  var children = _ref.children,
    className = _ref.className,
    rest = _objectWithoutPropertiesLoose(_ref, _excluded);
  return /*#__PURE__*/(
    React.createElement("div", _extends({
      className: css(line, className)
    }, rest), children)
  );
};
var Line = function Line(_ref2) {
  var children = _ref2.children,
    className = _ref2.className,
    rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
  return /*#__PURE__*/(
    React.createElement("div", _extends({
      className: css(line, className)
    }, rest), children)
  );
};
var Title = function Title(_ref3) {
  var children = _ref3.children,
    className = _ref3.className,
    rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
  return /*#__PURE__*/(
    React.createElement("span", _extends({
      className: css(title, className)
    }, rest), children)
  );
};
var Content = function Content(_ref4) {
  var children = _ref4.children,
    className = _ref4.className,
    rest = _objectWithoutPropertiesLoose(_ref4, _excluded4);
  return /*#__PURE__*/(
    React.createElement("span", _extends({
      className: css(content, className)
    }, rest), children)
  );
};
var LineBreak = function LineBreak(_ref5) {
  var children = _ref5.children,
    className = _ref5.className,
    rest = _objectWithoutPropertiesLoose(_ref5, _excluded5);
  return /*#__PURE__*/(
    React.createElement("div", _extends({
      className: css(formLineBreak, className)
    }, rest), children)
  );
};
var ActionsBar = function ActionsBar(_ref6) {
  var children = _ref6.children,
    className = _ref6.className,
    rest = _objectWithoutPropertiesLoose(_ref6, _excluded6);
  return /*#__PURE__*/(
    React.createElement("div", _extends({
      className: css(actionsBar, className)
    }, rest), children)
  );
};
export var Form = /*#__PURE__*/function (_React$Component) {
  function Form() {
    return _React$Component.apply(this, arguments) || this;
  }
  _inheritsLoose(Form, _React$Component);
  var _proto = Form.prototype;
  _proto.render = function render() {
    return /*#__PURE__*/React.createElement("div", {
      className: css(formWrapper, this.props.className)
    }, this.props.children);
  };
  return Form;
}(React.Component);
Form.Line = Line;
Form.LineBreak = LineBreak;
Form.ActionsBar = ActionsBar;
Form.FormLine = FormLine;
Form.Title = Title;
Form.Content = Content;