"use strict";

/*
Copyright 2021 Q-CTRL. All rights reserved.

Licensed under the Q-CTRL Terms of service (the "License"). Unauthorized
copying or use of this file, via any medium, is strictly prohibited.
Proprietary and confidential. You may not use this file except in compliance
with the License. You may obtain a copy of the License at

    https://q-ctrl.com/terms

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS. See the
License for the specific language.
*/
var _ = require("lodash");

var plugin = require("tailwindcss/plugin");

var errorVariants = plugin(function (_ref) {
  var addVariant = _ref.addVariant,
      e = _ref.e;
  addVariant('error', function (_ref2) {
    var modifySelectors = _ref2.modifySelectors,
        separator = _ref2.separator;
    modifySelectors(function (_ref3) {
      var className = _ref3.className;
      return ".".concat(e("error".concat(separator).concat(className)), "[error], .").concat(e("error".concat(separator, "checked").concat(separator).concat(className)), "[error]:checked, .").concat(e("error".concat(separator, "hover").concat(separator).concat(className)), "[error]:hover, .").concat(e("error".concat(separator, "focus").concat(separator).concat(className)), "[error]:focus, .").concat(e("error".concat(separator, "active").concat(separator).concat(className)), "[error]:active");
    });
  });
});
var groupErrorVariants = plugin(function (_ref4) {
  var addVariant = _ref4.addVariant,
      e = _ref4.e;
  addVariant('group-error', function (_ref5) {
    var modifySelectors = _ref5.modifySelectors,
        separator = _ref5.separator;
    modifySelectors(function (_ref6) {
      var className = _ref6.className;
      return ".group[error] .".concat(e("group-error".concat(separator).concat(className)), ", .group[error]:checked .").concat(e("group-error".concat(separator, "checked").concat(separator).concat(className)), ", .group[error]:hover .").concat(e("group-error".concat(separator, "hover").concat(separator).concat(className)), ", .group[error]:focus .").concat(e("group-error".concat(separator, "focus").concat(separator).concat(className)), ", .group[error]:active .").concat(e("group-error".concat(separator, "active").concat(separator).concat(className)));
    });
  });
});
var successVariants = plugin(function (_ref7) {
  var addVariant = _ref7.addVariant,
      e = _ref7.e;
  addVariant('success', function (_ref8) {
    var modifySelectors = _ref8.modifySelectors,
        separator = _ref8.separator;
    modifySelectors(function (_ref9) {
      var className = _ref9.className;
      return ".".concat(e("success".concat(separator).concat(className)), "[success], .").concat(e("success".concat(separator, "checked").concat(separator).concat(className)), "[success]:checked, .").concat(e("success".concat(separator, "hover").concat(separator).concat(className)), "[success]:hover, .").concat(e("success".concat(separator, "focus").concat(separator).concat(className)), "[success]:focus, .").concat(e("success".concat(separator, "active").concat(separator).concat(className)), "[success]:active");
    });
  });
});
var groupSuccessVariants = plugin(function (_ref10) {
  var addVariant = _ref10.addVariant,
      e = _ref10.e;
  addVariant('group-success', function (_ref11) {
    var modifySelectors = _ref11.modifySelectors,
        separator = _ref11.separator;
    modifySelectors(function (_ref12) {
      var className = _ref12.className;
      return ".group[success] .".concat(e("group-success".concat(separator).concat(className)), ", .group[success]:checked .").concat(e("group-success".concat(separator, "checked").concat(separator).concat(className)), ", .group[success]:hover .").concat(e("group-success".concat(separator, "hover").concat(separator).concat(className)), ", .group[success]:focus .").concat(e("group-success".concat(separator, "focus").concat(separator).concat(className)), ", .group[success]:active .").concat(e("group-success".concat(separator, "active").concat(separator).concat(className)));
    });
  });
});
module.exports = {
  errorVariants: errorVariants,
  groupErrorVariants: groupErrorVariants,
  successVariants: successVariants,
  groupSuccessVariants: groupSuccessVariants
};