function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
import TreeBtn from "./TreeBtn";
import "./wood.less";
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
function Index(props) {
  var cy01 = /*#__PURE__*/_jsx("div", {
    className: "toggles-container",
    children: /*#__PURE__*/_jsxs("div", {
      className: "toggle-container a",
      children: [/*#__PURE__*/_jsx("input", {
        className: "toggle-input",
        type: "checkbox"
      }), /*#__PURE__*/_jsx("div", {
        className: "toggle-handle"
      }), /*#__PURE__*/_jsx("svg", {
        className: "toggle-icon",
        viewBox: "0 0 16 16",
        xmlns: "http://www.w3.org/2000/svg",
        children: /*#__PURE__*/_jsx("path", {
          d: "M12.7072 5.70718L7.00008 11.4143L3.29297 7.70718L4.70718 6.29297L7.00008 8.58586L11.293 4.29297L12.7072 5.70718Z"
        })
      }), /*#__PURE__*/_jsx("svg", {
        className: "toggle-icon",
        viewBox: "0 0 16 16",
        xmlns: "http://www.w3.org/2000/svg",
        children: /*#__PURE__*/_jsx("path", {
          d: "M6.58594 8.00015L4.29297 5.70718L5.70718 4.29297L8.00015 6.58594L10.2931 4.29297L11.7073 5.70718L9.41436 8.00015L11.7072 10.293L10.293 11.7072L8.00015 9.41436L5.70733 11.7072L4.29312 10.293L6.58594 8.00015Z"
        })
      })]
    })
  });
  var cy02 = /*#__PURE__*/_jsxs("div", {
    className: "toggle-container b",
    children: [/*#__PURE__*/_jsx("input", {
      className: "toggle-input",
      type: "checkbox"
    }), /*#__PURE__*/_jsxs("div", {
      className: "toggle-handle",
      children: [/*#__PURE__*/_jsx("div", {
        className: "toggle-handle-dot"
      }), /*#__PURE__*/_jsx("div", {
        className: "toggle-handle-dot"
      }), /*#__PURE__*/_jsx("div", {
        className: "toggle-handle-dot"
      }), /*#__PURE__*/_jsx("div", {
        className: "toggle-handle-dot"
      }), /*#__PURE__*/_jsx("div", {
        className: "toggle-handle-dot"
      }), /*#__PURE__*/_jsx("div", {
        className: "toggle-handle-dot"
      })]
    }), /*#__PURE__*/_jsx("p", {
      className: "toggle-text off",
      "aria-hidden": "true",
      children: "OFF"
    }), /*#__PURE__*/_jsx("p", {
      className: "toggle-text on",
      "aria-hidden": "true",
      children: "ON"
    })]
  });
  var cy03 = /*#__PURE__*/_jsxs("div", {
    className: "toggle-container c",
    children: [/*#__PURE__*/_jsx("input", {
      className: "toggle-input",
      type: "checkbox"
    }), /*#__PURE__*/_jsx("p", {
      className: "toggle-text",
      "aria-hidden": "true",
      children: "OFF"
    }), /*#__PURE__*/_jsxs("div", {
      className: "toggle-track-wrapper-wrapper",
      children: [/*#__PURE__*/_jsx("div", {
        className: "toggle-handle"
      }), /*#__PURE__*/_jsx("div", {
        className: "toggle-track-wrapper",
        children: /*#__PURE__*/_jsx("div", {
          className: "toggle-track"
        })
      })]
    }), /*#__PURE__*/_jsx("p", {
      className: "toggle-text",
      "aria-hidden": "true",
      children: "ON"
    })]
  });
  var cy04 = /*#__PURE__*/_jsxs("div", {
    className: "toggle-container d",
    children: [/*#__PURE__*/_jsx("input", {
      className: "toggle-input",
      type: "checkbox"
    }), /*#__PURE__*/_jsxs("div", {
      className: "toggle-handle",
      children: [/*#__PURE__*/_jsx("p", {
        className: "toggle-text off",
        children: "OFF"
      }), /*#__PURE__*/_jsx("p", {
        className: "toggle-text on",
        children: "ON"
      })]
    })]
  });
  var cy05 = /*#__PURE__*/_jsxs("button", {
    children: [/*#__PURE__*/_jsx("span", {
      className: "text",
      children: props.text
    }), /*#__PURE__*/_jsx("span", {
      className: "shimmer"
    })]
  });
  var btnList = {
    cy01: cy01,
    cy02: cy02,
    cy03: cy03,
    cy04: cy04,
    cy05: cy05
  };
  var type = props.type || 'cy01';
  if (type == 'cy06') {
    return /*#__PURE__*/_jsx(TreeBtn, _objectSpread({}, props));
  }
  return /*#__PURE__*/_jsx("div", {
    className: 'cy01 cy02',
    children: /*#__PURE__*/_jsx("div", {
      className: "toggles-grid",
      children: /*#__PURE__*/_jsx("div", {
        className: "toggles-container",
        children: btnList[type]
      })
    })
  });
}
export default Index;