text: "use strict";
  var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
      if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
      return cooked;
  };
  var __assign = (this && this.__assign) || function () {
      __assign = Object.assign || function(t) {
          for (var s, i = 1, n = arguments.length; i < n; i++) {
              s = arguments[i];
              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                  t[p] = s[p];
          }
          return t;
      };
      return __assign.apply(this, arguments);
  };
  var __importStar = (this && this.__importStar) || function (mod) {
      if (mod && mod.__esModule) return mod;
      var result = {};
      if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
      result["default"] = mod;
      return result;
  };
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var react_1 = __importStar(require("react"));
  var styled_components_1 = __importDefault(require("styled-components"));
  var v4_1 = __importDefault(require("uuid/v4"));
  var Form_1 = require("../../Form");
  var ToggleSwitch_1 = require("../../Inputs/ToggleSwitch/ToggleSwitch");
  var Field_1 = require("../Field");
  var FieldToggleSwitchComponent = react_1.forwardRef(function (props, ref) {
      var validationMessage = Form_1.useFormContext(props);
      var _a = props.id, id = _a === void 0 ? v4_1.default() : _a;
      return (react_1.default.createElement(Field_1.Field, __assign({ id: id, alignLabel: "right", alignValidationMessage: "bottom", validationMessage: validationMessage }, Field_1.pickFieldProps(props)),
          react_1.default.createElement(ToggleSwitch_1.ToggleSwitch, __assign({}, Field_1.omitFieldProps(props), { id: id, validationType: validationMessage && validationMessage.type, ref: ref }))));
  });
  FieldToggleSwitchComponent.displayName = 'FieldToggleSwitchComponent';
  exports.FieldToggleSwitch = styled_components_1.default(FieldToggleSwitchComponent).withConfig({ displayName: "FieldToggleSwitch", componentId: "sc-1gsx5as" })(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
  var templateObject_1;
  //# sourceMappingURL=FieldToggleSwitch.js.map