/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./assets/src/components/library-icon/InserterModal.jsx":
/*!**************************************************************!*\
  !*** ./assets/src/components/library-icon/InserterModal.jsx ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ InserterModal)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icons */ "./assets/src/components/library-icon/icons.js");

// InserterModal.jsx




function InserterModal({
  isOpen,
  setIsOpen,
  setAttributes
}) {
  const icons = (0,_icons__WEBPACK_IMPORTED_MODULE_4__["default"])();
  const [search, setSearch] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)('');
  if (!isOpen) return null;
  const handleSelect = iconClass => {
    setAttributes({
      iconClass
    });
    setIsOpen(false);
  };
  const filteredIcons = icons.filter(item => item.name.toLowerCase().includes(search.toLowerCase()));
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Modal, {
    onRequestClose: () => setIsOpen(false),
    className: "thim-blocks-icon-modal no-default-header",
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Select Icon', 'thim-blocks')
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "thim-blocks-modal-custom-header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Select Icon', 'thim-blocks')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      display: 'flex',
      gap: '8px',
      alignItems: 'center'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
    placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search icons…', 'thim-blocks'),
    value: search,
    onChange: val => setSearch(val),
    style: {
      width: 200
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    icon: "no-alt",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Close', 'thim-blocks'),
    onClick: () => setIsOpen(false),
    isSmall: true
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    style: {
      display: 'grid',
      gridTemplateColumns: 'repeat(auto-fill, minmax(60px, 1fr))',
      gap: '12px',
      maxHeight: '400px',
      maxWidth: '1200px',
      overflowY: 'auto'
    }
  }, filteredIcons.map(item => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    key: item.name,
    onClick: () => handleSelect(item.icon.props.className),
    style: {
      height: 60,
      width: 60,
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'center',
      fontSize: 24,
      color: '#111111'
    },
    variant: "secondary"
  }, item.icon))));
}

/***/ }),

/***/ "./assets/src/components/library-icon/icons.js":
/*!*****************************************************!*\
  !*** ./assets/src/components/library-icon/icons.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ getIcons)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);

function getIcons() {
  return [{
    name: "alarm-clock",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-alarm-clock"
    })
  }, {
    name: "angle-double-down",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-angle-double-down"
    })
  }, {
    name: "angle-double-left",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-angle-double-left"
    })
  }, {
    name: "angle-double-right",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-angle-double-right"
    })
  }, {
    name: "angle-double-up",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-angle-double-up"
    })
  }, {
    name: "angle-down",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-angle-down"
    })
  }, {
    name: "angle-left",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-angle-left"
    })
  }, {
    name: "angle-right",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-angle-right"
    })
  }, {
    name: "angle-up",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-angle-up"
    })
  }, {
    name: "arrow-left",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-arrow-left"
    })
  }, {
    name: "arrow-right",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-arrow-right"
    })
  }, {
    name: "drag",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-drag"
    })
  }, {
    name: "drag-alt",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-drag-alt"
    })
  }, {
    name: "art-and-design",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-art-and-design"
    })
  }, {
    name: "bar-chart",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-bar-chart"
    })
  }, {
    name: "bar-chart-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-bar-chart-o"
    })
  }, {
    name: "bell-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-bell-o"
    })
  }, {
    name: "best-customer-experience",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-best-customer-experience"
    })
  }, {
    name: "book",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-book"
    })
  }, {
    name: "book-open",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-book-open"
    })
  }, {
    name: "bookmark",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-bookmark"
    })
  }, {
    name: "bookmark-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-bookmark-o"
    })
  }, {
    name: "box",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-box"
    })
  }, {
    name: "briefcase",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-briefcase"
    })
  }, {
    name: "bullhorn",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-bullhorn"
    })
  }, {
    name: "calendar",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-calendar"
    })
  }, {
    name: "calendar-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-calendar-o"
    })
  }, {
    name: "caret-down",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-caret-down"
    })
  }, {
    name: "caret-left",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-caret-left"
    })
  }, {
    name: "caret-right",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-caret-right"
    })
  }, {
    name: "caret-up",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-caret-up"
    })
  }, {
    name: "certificate",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-certificate"
    })
  }, {
    name: "certificate-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-certificate-o"
    })
  }, {
    name: "check",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-check"
    })
  }, {
    name: "check-circle",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-check-circle"
    })
  }, {
    name: "check-square-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-check-square-o"
    })
  }, {
    name: "chevron-down",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-chevron-down"
    })
  }, {
    name: "chevron-left",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-chevron-left"
    })
  }, {
    name: "chevron-right",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-chevron-right"
    })
  }, {
    name: "chevron-up",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-chevron-up"
    })
  }, {
    name: "circle-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-circle-o"
    })
  }, {
    name: "circle-thin",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-circle-thin"
    })
  }, {
    name: "clock",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-clock"
    })
  }, {
    name: "clock-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-clock-o"
    })
  }, {
    name: "close",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-close"
    })
  }, {
    name: "close-circle",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-close-circle"
    })
  }, {
    name: "co-instructor",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-co-instructor"
    })
  }, {
    name: "code",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-code"
    })
  }, {
    name: "cog",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-cog"
    })
  }, {
    name: "cogs",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-cogs"
    })
  }, {
    name: "comment",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-comment"
    })
  }, {
    name: "comment-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-comment-o"
    })
  }, {
    name: "comment-written",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-comment-written"
    })
  }, {
    name: "community",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-community"
    })
  }, {
    name: "compress",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-compress"
    })
  }, {
    name: "concierge-bell",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-concierge-bell"
    })
  }, {
    name: "content-marketing",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-content-marketing"
    })
  }, {
    name: "copy",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-copy"
    })
  }, {
    name: "courses",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-courses"
    })
  }, {
    name: "database",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-database"
    })
  }, {
    name: "desktop",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-desktop"
    })
  }, {
    name: "dollar-sign",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-dollar-sign"
    })
  }, {
    name: "dot-circle-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-dot-circle-o"
    })
  }, {
    name: "download",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-download"
    })
  }, {
    name: "dropbox",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-dropbox"
    })
  }, {
    name: "ebook",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-ebook"
    })
  }, {
    name: "edit",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-edit"
    })
  }, {
    name: "educational-programs",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-educational-programs"
    })
  }, {
    name: "ellipsis-h",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-ellipsis-h"
    })
  }, {
    name: "ellipsis-v",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-ellipsis-v"
    })
  }, {
    name: "envelope-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-envelope-o"
    })
  }, {
    name: "exclamation-circle",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-exclamation-circle"
    })
  }, {
    name: "exclamation-triangle",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-exclamation-triangle"
    })
  }, {
    name: "expand",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-expand"
    })
  }, {
    name: "eye",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-eye"
    })
  }, {
    name: "eye-slash",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-eye-slash"
    })
  }, {
    name: "facebook",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-facebook"
    })
  }, {
    name: "facebook-f",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-facebook-f"
    })
  }, {
    name: "failed_courses",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-failed_courses"
    })
  }, {
    name: "file",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file"
    })
  }, {
    name: "file-alt",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-alt"
    })
  }, {
    name: "file-archive",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-archive"
    })
  }, {
    name: "file-audio",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-audio"
    })
  }, {
    name: "file-code",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-code"
    })
  }, {
    name: "file-download",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-download"
    })
  }, {
    name: "file-excel",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-excel"
    })
  }, {
    name: "file-image",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-image"
    })
  }, {
    name: "file-movie",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-movie"
    })
  }, {
    name: "file-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-o"
    })
  }, {
    name: "file-pdf",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-pdf"
    })
  }, {
    name: "file-photo",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-photo"
    })
  }, {
    name: "file-picture",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-picture"
    })
  }, {
    name: "file-powerpoint",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-powerpoint"
    })
  }, {
    name: "file-sound",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-sound"
    })
  }, {
    name: "file-text-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-text-o"
    })
  }, {
    name: "file-video",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-video"
    })
  }, {
    name: "file-word",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-word"
    })
  }, {
    name: "file-zip",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-file-zip"
    })
  }, {
    name: "files-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-files-o"
    })
  }, {
    name: "filter",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-filter"
    })
  }, {
    name: "finished_courses",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-finished_courses"
    })
  }, {
    name: "flag",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-flag"
    })
  }, {
    name: "gear",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-gear"
    })
  }, {
    name: "gears",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-gears"
    })
  }, {
    name: "gift",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-gift"
    })
  }, {
    name: "google",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-google"
    })
  }, {
    name: "google-plus",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-google-plus"
    })
  }, {
    name: "google-plus-circle",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-google-plus-circle"
    })
  }, {
    name: "google-plus-official",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-google-plus-official"
    })
  }, {
    name: "google-plus-square",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-google-plus-square"
    })
  }, {
    name: "graduation-cap",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-graduation-cap"
    })
  }, {
    name: "heart",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-heart"
    })
  }, {
    name: "heart-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-heart-o"
    })
  }, {
    name: "home",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-home"
    })
  }, {
    name: "icon-h5p",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-icon-h5p"
    })
  }, {
    name: "in_progress_course",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-in_progress_course"
    })
  }, {
    name: "instagram",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-instagram"
    })
  }, {
    name: "key",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-key"
    })
  }, {
    name: "language",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-language"
    })
  }, {
    name: "layers",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-layers"
    })
  }, {
    name: "line-chart",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-line-chart"
    })
  }, {
    name: "linkedin",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-linkedin"
    })
  }, {
    name: "linkedin-square",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-linkedin-square"
    })
  }, {
    name: "list",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-list"
    })
  }, {
    name: "list-check",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-list-check"
    })
  }, {
    name: "lock",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-lock"
    })
  }, {
    name: "lucide",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-lucide"
    })
  }, {
    name: "map-marker",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-map-marker"
    })
  }, {
    name: "map-pin",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-map-pin"
    })
  }, {
    name: "minus",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-minus"
    })
  }, {
    name: "mobile",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-mobile"
    })
  }, {
    name: "mobile-phone",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-mobile-phone"
    })
  }, {
    name: "money-bill-alt",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-money-bill-alt"
    })
  }, {
    name: "monitor",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-monitor"
    })
  }, {
    name: "mortar-board",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-mortar-board"
    })
  }, {
    name: "my-courses",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-my-courses"
    })
  }, {
    name: "online-class",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-online-class"
    })
  }, {
    name: "online-education",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-online-education"
    })
  }, {
    name: "passed_courses",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-passed_courses"
    })
  }, {
    name: "pencil-square-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-pencil-square-o"
    })
  }, {
    name: "pending_course",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-pending_course"
    })
  }, {
    name: "phone",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-phone"
    })
  }, {
    name: "pie-chart",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-pie-chart"
    })
  }, {
    name: "pinterest",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-pinterest"
    })
  }, {
    name: "pinterest-square",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-pinterest-square"
    })
  }, {
    name: "play-circle-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-play-circle-o"
    })
  }, {
    name: "plus",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-plus"
    })
  }, {
    name: "published_course",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-published_course"
    })
  }, {
    name: "puzzle-piece",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-puzzle-piece"
    })
  }, {
    name: "question",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-question"
    })
  }, {
    name: "question-circle",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-question-circle"
    })
  }, {
    name: "question-circle-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-question-circle-o"
    })
  }, {
    name: "refresh",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-refresh"
    })
  }, {
    name: "remove",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-remove"
    })
  }, {
    name: "search",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-search"
    })
  }, {
    name: "share-alt",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-share-alt"
    })
  }, {
    name: "shopping-cart",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-shopping-cart"
    })
  }, {
    name: "sign-in",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-sign-in"
    })
  }, {
    name: "sign-out",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-sign-out"
    })
  }, {
    name: "signal",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-signal"
    })
  }, {
    name: "spinner",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-spinner"
    })
  }, {
    name: "square-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-square-o"
    })
  }, {
    name: "star",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-star"
    })
  }, {
    name: "star-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-star-o"
    })
  }, {
    name: "stopwatch",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-stopwatch"
    })
  }, {
    name: "student_completed",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-student_completed"
    })
  }, {
    name: "student_in_progress",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-student_in_progress"
    })
  }, {
    name: "students",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-students"
    })
  }, {
    name: "target",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-target"
    })
  }, {
    name: "television",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-television"
    })
  }, {
    name: "th",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-th"
    })
  }, {
    name: "th-large",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-th-large"
    })
  }, {
    name: "th-list",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-th-list"
    })
  }, {
    name: "thumbs-o-down",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-thumbs-o-down"
    })
  }, {
    name: "thumbs-o-up",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-thumbs-o-up"
    })
  }, {
    name: "tiktok",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-tiktok"
    })
  }, {
    name: "times",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-times"
    })
  }, {
    name: "trash-o",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-trash-o"
    })
  }, {
    name: "tv",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-tv"
    })
  }, {
    name: "twitter",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-twitter"
    })
  }, {
    name: "unlock",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-unlock"
    })
  }, {
    name: "user",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-user"
    })
  }, {
    name: "user-circle",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-user-circle"
    })
  }, {
    name: "user-edit",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-user-edit"
    })
  }, {
    name: "user-graduate",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-user-graduate"
    })
  }, {
    name: "user-secret",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-user-secret"
    })
  }, {
    name: "video-camera",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-video-camera"
    })
  }, {
    name: "warning",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-warning"
    })
  }, {
    name: "website",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-website"
    })
  }, {
    name: "worldwide-security",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-worldwide-security"
    })
  }, {
    name: "youtube",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-youtube"
    })
  }, {
    name: "reddit",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-reddit"
    })
  }, {
    name: "whatsapp",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-whatsapp"
    })
  }, {
    name: "pocket",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-pocket"
    })
  }, {
    name: "stumbleupon",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-stumbleupon"
    })
  }, {
    name: "tumblr",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-tumblr"
    })
  }, {
    name: "blogger",
    icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: "tb-icon-blogger"
    })
  }];
}

/***/ }),

/***/ "./assets/src/filters/buttons-control/buttons-control.scss":
/*!*****************************************************************!*\
  !*** ./assets/src/filters/buttons-control/buttons-control.scss ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "react":
/*!************************!*\
  !*** external "React" ***!
  \************************/
/***/ ((module) => {

"use strict";
module.exports = window["React"];

/***/ }),

/***/ "@wordpress/block-editor":
/*!*************************************!*\
  !*** external ["wp","blockEditor"] ***!
  \*************************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["blockEditor"];

/***/ }),

/***/ "@wordpress/components":
/*!************************************!*\
  !*** external ["wp","components"] ***!
  \************************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["components"];

/***/ }),

/***/ "@wordpress/element":
/*!*********************************!*\
  !*** external ["wp","element"] ***!
  \*********************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["element"];

/***/ }),

/***/ "@wordpress/hooks":
/*!*******************************!*\
  !*** external ["wp","hooks"] ***!
  \*******************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["hooks"];

/***/ }),

/***/ "@wordpress/i18n":
/*!******************************!*\
  !*** external ["wp","i18n"] ***!
  \******************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["i18n"];

/***/ }),

/***/ "./node_modules/classnames/index.js":
/*!******************************************!*\
  !*** ./node_modules/classnames/index.js ***!
  \******************************************/
/***/ ((module, exports) => {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/
/* global define */

(function () {
	'use strict';

	var hasOwn = {}.hasOwnProperty;

	function classNames () {
		var classes = '';

		for (var i = 0; i < arguments.length; i++) {
			var arg = arguments[i];
			if (arg) {
				classes = appendClass(classes, parseValue(arg));
			}
		}

		return classes;
	}

	function parseValue (arg) {
		if (typeof arg === 'string' || typeof arg === 'number') {
			return arg;
		}

		if (typeof arg !== 'object') {
			return '';
		}

		if (Array.isArray(arg)) {
			return classNames.apply(null, arg);
		}

		if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
			return arg.toString();
		}

		var classes = '';

		for (var key in arg) {
			if (hasOwn.call(arg, key) && arg[key]) {
				classes = appendClass(classes, key);
			}
		}

		return classes;
	}

	function appendClass (value, newClass) {
		if (!newClass) {
			return value;
		}
	
		if (value) {
			return value + ' ' + newClass;
		}
	
		return value + newClass;
	}

	if ( true && module.exports) {
		classNames.default = classNames;
		module.exports = classNames;
	} else if (true) {
		// register as 'classnames', consistent with npm package name
		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
			return classNames;
		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
	} else {}
}());


/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
/*!***************************************************************!*\
  !*** ./assets/src/filters/buttons-control/buttons-control.js ***!
  \***************************************************************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks");
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _components_library_icon_InserterModal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/library-icon/InserterModal */ "./assets/src/components/library-icon/InserterModal.jsx");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _buttons_control_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./buttons-control.scss */ "./assets/src/filters/buttons-control/buttons-control.scss");









const ButtonsIconControl = ({
  attributes,
  setAttributes
}) => {
  const {
    iconClass,
    iconSVG,
    iconPosition
  } = attributes;
  const [isIconModalOpen, setIconModalOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [svgContent, setSvgContent] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(iconSVG || '');
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Thim Icon Settings', 'thim-blocks'),
    initialOpen: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.SelectControl, {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Icon Position', 'thim-blocks'),
    value: iconPosition || 'none',
    options: [{
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('None', 'thim-blocks'),
      value: 'none'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Left', 'thim-blocks'),
      value: 'left'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Right', 'thim-blocks'),
      value: 'right'
    }],
    onChange: val => setAttributes({
      iconPosition: val
    })
  }), iconPosition && iconPosition !== 'none' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TabPanel, {
    className: "icon-tab-panel",
    activeClass: "is-active",
    tabs: [{
      name: 'select',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Library Icon', 'thim-blocks')
    }, {
      name: 'upload',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Upload SVG', 'thim-blocks')
    }]
  }, tab => {
    if (tab.name === 'select') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "icon-preview-box"
      }, iconClass && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
        icon: "no-alt",
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Remove Icon', 'thim-blocks'),
        onClick: () => setAttributes({
          iconClass: ''
        }),
        style: {
          position: 'absolute',
          top: '6px',
          right: '6px',
          padding: '4px',
          background: 'transparent'
        }
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
        className: iconClass,
        style: {
          fontSize: '32px'
        }
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
        variant: "secondary",
        onClick: () => setIconModalOpen(true),
        style: {
          width: '100%'
        }
      }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Select Icon', 'thim-blocks')));
    }
    if (tab.name === 'upload') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "icon-preview-box"
      }, iconSVG && svgContent && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
        icon: "no-alt",
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Remove Icon', 'thim-blocks'),
        onClick: () => setAttributes({
          iconSVG: ''
        }),
        style: {
          position: 'absolute',
          top: '6px',
          right: '6px',
          padding: '4px',
          background: 'transparent'
        }
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
        dangerouslySetInnerHTML: {
          __html: svgContent
        },
        style: {
          display: 'inline-block'
        }
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.MediaUpload, {
        onSelect: media => {
          if (media && media.url) {
            fetch(media.url).then(res => res.text()).then(svgText => {
              setAttributes({
                iconSVG: svgText
              });
              setSvgContent(svgText);
            });
          }
        },
        allowedTypes: ['image/svg+xml'],
        render: ({
          open
        }) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
          variant: "secondary",
          onClick: open,
          style: {
            width: '100%'
          }
        }, iconSVG ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Change SVG Icon', 'thim-blocks') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Upload SVG Icon', 'thim-blocks'))
      }));
    }
    return null;
  }))), isIconModalOpen && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_icon_InserterModal__WEBPACK_IMPORTED_MODULE_6__["default"], {
    isOpen: isIconModalOpen,
    setIsOpen: setIconModalOpen,
    setAttributes: setAttributes
  }));
};

/**
 * Editor block class (visual)
 */
function addIconClassToButton(BlockListBlock) {
  return props => {
    const {
      name,
      attributes
    } = props;
    if (name !== 'core/button') return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(BlockListBlock, {
      ...props
    });
    const {
      iconClass,
      iconSVG,
      iconPosition
    } = attributes;
    if (!iconPosition || iconPosition === 'none') {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(BlockListBlock, {
        ...props
      });
    }
    const finalIconClass = iconSVG ? '' : iconClass;
    const classes = classnames__WEBPACK_IMPORTED_MODULE_7___default()(props.className, {
      [`has-icon__${finalIconClass}`]: finalIconClass,
      'has-icon__svg': iconSVG,
      'has-icon-position__left': iconPosition === 'left',
      'has-icon-position__right': iconPosition === 'right'
    });
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(BlockListBlock, {
      ...props,
      className: classes
    });
  };
}
(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__.addFilter)('editor.BlockListBlock', 'thim-blocks/button-add-icon-class', addIconClassToButton);

/**
 * Add class/data for frontend save
 */
const withButtonExtraProps = (saveProps, blockType, attributes) => {
  if (blockType.name !== 'core/button') return saveProps;
  let className = saveProps.className || '';
  const {
    iconClass,
    iconSVG,
    iconPosition
  } = attributes;
  if (!iconPosition || iconPosition === 'none') {
    return {
      ...saveProps,
      className
    };
  }
  const finalIconClass = iconSVG ? '' : iconClass;
  if (iconSVG) {
    className += ` has-icon__svg has-icon-position-${iconPosition}`;
  } else if (finalIconClass) {
    className += ` has-icon__${finalIconClass} has-icon-position-${iconPosition}`;
  }
  return {
    ...saveProps,
    className
  };
};
(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__.addFilter)('blocks.getSaveContent.extraProps', 'thim-blocks/button-extra-props', withButtonExtraProps);

/**
 * Wrap BlockEdit to add Inspector controls
 */
const withButtonsIconControl = BlockEdit => props => {
  if (props.name !== 'core/button') return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(BlockEdit, {
    ...props
  });
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(BlockEdit, {
    ...props
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ButtonsIconControl, {
    ...props
  }));
};
(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__.addFilter)('editor.BlockEdit', 'thim-blocks/buttons-icon-control', withButtonsIconControl);

/**
 * Add custom attributes
 */
(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__.addFilter)('blocks.registerBlockType', 'thim-blocks/button-add-icon-attribute', (settings, name) => {
  if (name !== 'core/button') return settings;
  return {
    ...settings,
    attributes: {
      ...settings.attributes,
      iconClass: {
        type: 'string',
        default: ''
      },
      iconSVG: {
        type: 'string',
        default: ''
      },
      iconPosition: {
        type: 'string',
        default: 'none'
      }
    }
  };
});
})();

/******/ })()
;
//# sourceMappingURL=buttons-control.js.map