/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

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

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

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// 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 */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(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 */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(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 isolated against other modules in the chunk.
!function() {
/*!****************************!*\
  !*** ./src/main-slider.js ***!
  \****************************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);

const {
  registerBlockType
} = wp.blocks;
const {
  InspectorControls,
  MediaUpload,
  MediaUploadCheck
} = wp.blockEditor;
const {
  PanelBody,
  Button,
  ResponsiveWrapper,
  SelectControl,
  TextControl,
  ToggleControl
} = wp.components;
const {
  Fragment
} = wp.element;
const {
  withSelect
} = wp.data;

const BlockEdit = props => {
  const {
    attributes,
    setAttributes
  } = props;

  const removeMedia1 = () => {
    setAttributes({
      mediaId1: 0,
      mediaUrl1: ''
    });
  };

  const onSelectMedia1 = media => {
    setAttributes({
      mediaId1: media.id,
      mediaUrl1: media.url
    });
  };

  const removeMedia2 = () => {
    setAttributes({
      mediaId2: 0,
      mediaUrl2: ''
    });
  };

  const onSelectMedia2 = media => {
    setAttributes({
      mediaId2: media.id,
      mediaUrl2: media.url
    });
  };

  const removeMedia3 = () => {
    setAttributes({
      mediaId3: 0,
      mediaUrl3: ''
    });
  };

  const onSelectMedia3 = media => {
    setAttributes({
      mediaId3: media.id,
      mediaUrl3: media.url
    });
  };

  const removeMedia4 = () => {
    setAttributes({
      mediaId4: 0,
      mediaUrl4: ''
    });
  };

  const onSelectMedia4 = media => {
    setAttributes({
      mediaId4: media.id,
      mediaUrl4: media.url
    });
  };

  const removeMedia5 = () => {
    setAttributes({
      mediaId5: 0,
      mediaUrl5: ''
    });
  };

  const onSelectMedia5 = media => {
    setAttributes({
      mediaId5: media.id,
      mediaUrl5: media.url
    });
  };

  const removeAdsMedia1 = () => {
    setAttributes({
      adsMediaId1: 0,
      adsMediaUrl1: ''
    });
  };

  const onSelectAdsMedia1 = media => {
    setAttributes({
      adsMediaId1: media.id,
      adsMediaUrl1: media.url
    });
  };

  const removeAdsMedia2 = () => {
    setAttributes({
      adsMediaId2: 0,
      adsMediaUrl2: ''
    });
  };

  const onSelectAdsMedia2 = media => {
    setAttributes({
      adsMediaId2: media.id,
      adsMediaUrl2: media.url
    });
  };

  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(PanelBody, {
    title: IRK_BLOCK_DATA.options,
    initialOpen: true
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, IRK_BLOCK_DATA.slide, " 1"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.url,
    value: attributes.url1,
    onChange: value => setAttributes({
      url1: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleControl, {
    label: IRK_BLOCK_DATA.openNewTab,
    checked: attributes.target1,
    onChange: value => setAttributes({
      target1: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.xfn,
    value: attributes.xfn1,
    onChange: value => setAttributes({
      xfn1: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "editor-post-featured-image"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, IRK_BLOCK_DATA.image), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    onSelect: onSelectMedia1,
    value: attributes.mediaId1,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      className: attributes.mediaId1 == 0 ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
      onClick: open
    }, attributes.mediaId1 == 0 && IRK_BLOCK_DATA.chooseImg, props.media1 != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ResponsiveWrapper, {
      naturalWidth: props.media1.media_details.width,
      naturalHeight: props.media1.media_details.height
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: props.media1.source_url
    })))
  })), attributes.mediaId1 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    title: IRK_BLOCK_DATA.replaceImg,
    value: attributes.mediaId1,
    onSelect: onSelectMedia1,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      onClick: open,
      isDefault: true,
      isLarge: true
    }, IRK_BLOCK_DATA.replaceImg)
  })), attributes.mediaId1 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
    onClick: removeMedia1,
    isLink: true,
    isDestructive: true
  }, IRK_BLOCK_DATA.removeImg))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("hr", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, IRK_BLOCK_DATA.slide, " 2"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.url,
    value: attributes.url2,
    onChange: value => setAttributes({
      url2: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleControl, {
    label: IRK_BLOCK_DATA.openNewTab,
    checked: attributes.target2,
    onChange: value => setAttributes({
      target2: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.xfn,
    value: attributes.xfn2,
    onChange: value => setAttributes({
      xfn2: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "editor-post-featured-image"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, IRK_BLOCK_DATA.image, " 2"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    onSelect: onSelectMedia2,
    value: attributes.mediaId2,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      className: attributes.mediaId2 == 0 ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
      onClick: open
    }, attributes.mediaId2 == 0 && IRK_BLOCK_DATA.chooseImg, props.media2 != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ResponsiveWrapper, {
      naturalWidth: props.media2.media_details.width,
      naturalHeight: props.media2.media_details.height
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: props.media2.source_url
    })))
  })), attributes.mediaId2 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    title: IRK_BLOCK_DATA.replaceImg,
    value: attributes.mediaId2,
    onSelect: onSelectMedia2,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      onClick: open,
      isDefault: true,
      isLarge: true
    }, IRK_BLOCK_DATA.replaceImg)
  })), attributes.mediaId2 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
    onClick: removeMedia2,
    isLink: true,
    isDestructive: true
  }, IRK_BLOCK_DATA.removeImg))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("hr", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, IRK_BLOCK_DATA.slide, " 3"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.url,
    value: attributes.url3,
    onChange: value => setAttributes({
      url3: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleControl, {
    label: IRK_BLOCK_DATA.openNewTab,
    checked: attributes.target3,
    onChange: value => setAttributes({
      target3: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.xfn,
    value: attributes.xfn3,
    onChange: value => setAttributes({
      xfn3: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "editor-post-featured-image"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, IRK_BLOCK_DATA.image, " 3"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    onSelect: onSelectMedia3,
    value: attributes.mediaId3,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      className: attributes.mediaId3 == 0 ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
      onClick: open
    }, attributes.mediaId3 == 0 && IRK_BLOCK_DATA.chooseImg, props.media3 != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ResponsiveWrapper, {
      naturalWidth: props.media3.media_details.width,
      naturalHeight: props.media3.media_details.height
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: props.media3.source_url
    })))
  })), attributes.mediaId3 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    title: IRK_BLOCK_DATA.replaceImg,
    value: attributes.mediaId3,
    onSelect: onSelectMedia3,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      onClick: open,
      isDefault: true,
      isLarge: true
    }, IRK_BLOCK_DATA.replaceImg)
  })), attributes.mediaId3 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
    onClick: removeMedia3,
    isLink: true,
    isDestructive: true
  }, IRK_BLOCK_DATA.removeImg))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("hr", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, IRK_BLOCK_DATA.slide, " 4"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.url,
    value: attributes.url4,
    onChange: value => setAttributes({
      url4: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleControl, {
    label: IRK_BLOCK_DATA.openNewTab,
    checked: attributes.target4,
    onChange: value => setAttributes({
      target4: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.xfn,
    value: attributes.xfn4,
    onChange: value => setAttributes({
      xfn4: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "editor-post-featured-image"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, IRK_BLOCK_DATA.image, " 4"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    onSelect: onSelectMedia4,
    value: attributes.mediaId4,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      className: attributes.mediaId4 == 0 ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
      onClick: open
    }, attributes.mediaId4 == 0 && IRK_BLOCK_DATA.chooseImg, props.media4 != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ResponsiveWrapper, {
      naturalWidth: props.media4.media_details.width,
      naturalHeight: props.media4.media_details.height
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: props.media4.source_url
    })))
  })), attributes.mediaId4 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    title: IRK_BLOCK_DATA.replaceImg,
    value: attributes.mediaId4,
    onSelect: onSelectMedia4,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      onClick: open,
      isDefault: true,
      isLarge: true
    }, IRK_BLOCK_DATA.replaceImg)
  })), attributes.mediaId4 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
    onClick: removeMedia4,
    isLink: true,
    isDestructive: true
  }, IRK_BLOCK_DATA.removeImg))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("hr", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, IRK_BLOCK_DATA.slide, " 5"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.url,
    value: attributes.url5,
    onChange: value => setAttributes({
      url5: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleControl, {
    label: IRK_BLOCK_DATA.openNewTab,
    checked: attributes.target5,
    onChange: value => setAttributes({
      target5: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.xfn,
    value: attributes.xfn5,
    onChange: value => setAttributes({
      xfn5: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "editor-post-featured-image"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, IRK_BLOCK_DATA.image, " 5"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    onSelect: onSelectMedia5,
    value: attributes.mediaId5,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      className: attributes.mediaId5 == 0 ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
      onClick: open
    }, attributes.mediaId5 == 0 && IRK_BLOCK_DATA.chooseImg, props.media5 != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ResponsiveWrapper, {
      naturalWidth: props.media5.media_details.width,
      naturalHeight: props.media5.media_details.height
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: props.media5.source_url
    })))
  })), attributes.mediaId5 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    title: IRK_BLOCK_DATA.replaceImg,
    value: attributes.mediaId5,
    onSelect: onSelectMedia5,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      onClick: open,
      isDefault: true,
      isLarge: true
    }, IRK_BLOCK_DATA.replaceImg)
  })), attributes.mediaId5 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
    onClick: removeMedia5,
    isLink: true,
    isDestructive: true
  }, IRK_BLOCK_DATA.removeImg))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("hr", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, IRK_BLOCK_DATA.sideAds, " 1"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.url,
    value: attributes.adsUrl1,
    onChange: value => setAttributes({
      adsUrl1: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleControl, {
    label: IRK_BLOCK_DATA.openNewTab,
    checked: attributes.adsTarget1,
    onChange: value => setAttributes({
      adsTarget1: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.xfn,
    value: attributes.adsXfn1,
    onChange: value => setAttributes({
      adsXfn1: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "editor-post-featured-image"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, IRK_BLOCK_DATA.image), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    onSelect: onSelectAdsMedia1,
    value: attributes.adsMediaId1,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      className: attributes.adsMediaId1 == 0 ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
      onClick: open
    }, attributes.adsMediaId1 == 0 && IRK_BLOCK_DATA.chooseImg, props.adsMedia1 != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ResponsiveWrapper, {
      naturalWidth: props.adsMedia1.media_details.width,
      naturalHeight: props.adsMedia1.media_details.height
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: props.adsMedia1.source_url
    })))
  })), attributes.adsMediaId1 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    title: IRK_BLOCK_DATA.replaceImg,
    value: attributes.adsMediaId1,
    onSelect: onSelectAdsMedia1,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      onClick: open,
      isDefault: true,
      isLarge: true
    }, IRK_BLOCK_DATA.replaceImg)
  })), attributes.adsMediaId1 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
    onClick: removeAdsMedia1,
    isLink: true,
    isDestructive: true
  }, IRK_BLOCK_DATA.removeImg))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("hr", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, IRK_BLOCK_DATA.sideAds, " 2"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.url,
    value: attributes.adsUrl2,
    onChange: value => setAttributes({
      adsUrl2: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToggleControl, {
    label: IRK_BLOCK_DATA.openNewTab,
    checked: attributes.adsTarget2,
    onChange: value => setAttributes({
      adsTarget2: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "irk-panel-row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TextControl, {
    label: IRK_BLOCK_DATA.xfn,
    value: attributes.adsXfn2,
    onChange: value => setAttributes({
      adsXfn2: value
    })
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "editor-post-featured-image"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, IRK_BLOCK_DATA.image), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    onSelect: onSelectAdsMedia2,
    value: attributes.adsMediaId2,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      className: attributes.adsMediaId2 == 0 ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
      onClick: open
    }, attributes.adsMediaId2 == 0 && IRK_BLOCK_DATA.chooseImg, props.adsMedia2 != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ResponsiveWrapper, {
      naturalWidth: props.adsMedia2.media_details.width,
      naturalHeight: props.adsMedia2.media_details.height
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: props.adsMedia2.source_url
    })))
  })), attributes.adsMediaId2 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUpload, {
    title: IRK_BLOCK_DATA.replaceImg,
    value: attributes.adsMediaId2,
    onSelect: onSelectAdsMedia2,
    allowedTypes: ['image'],
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
      onClick: open,
      isDefault: true,
      isLarge: true
    }, IRK_BLOCK_DATA.replaceImg)
  })), attributes.adsMediaId2 != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Button, {
    onClick: removeAdsMedia2,
    isLink: true,
    isDestructive: true
  }, IRK_BLOCK_DATA.removeImg))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, IRK_BLOCK_DATA.mainSlider), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, IRK_BLOCK_DATA.mainSliderDesc)));
};

registerBlockType('irankala/main-slider', {
  title: IRK_BLOCK_DATA.mainSlider,
  description: IRK_BLOCK_DATA.mainSliderDesc,
  icon: 'welcome-view-site',
  category: 'irankala',
  attributes: {
    url1: {
      type: 'string'
    },
    target1: {
      type: 'boolean'
    },
    xfn1: {
      type: 'string'
    },
    mediaId1: {
      type: 'number',
      default: 0
    },
    mediaUrl1: {
      type: 'string',
      default: ''
    },
    url2: {
      type: 'string'
    },
    target2: {
      type: 'boolean'
    },
    xfn2: {
      type: 'string'
    },
    mediaId2: {
      type: 'number',
      default: 0
    },
    mediaUrl2: {
      type: 'string',
      default: ''
    },
    url3: {
      type: 'string'
    },
    target3: {
      type: 'boolean'
    },
    xfn3: {
      type: 'string'
    },
    mediaId3: {
      type: 'number',
      default: 0
    },
    mediaUrl3: {
      type: 'string',
      default: ''
    },
    url4: {
      type: 'string'
    },
    target4: {
      type: 'boolean'
    },
    xfn4: {
      type: 'string'
    },
    mediaId4: {
      type: 'number',
      default: 0
    },
    mediaUrl4: {
      type: 'string',
      default: ''
    },
    url5: {
      type: 'string'
    },
    target5: {
      type: 'boolean'
    },
    xfn5: {
      type: 'string'
    },
    mediaId5: {
      type: 'number',
      default: 0
    },
    mediaUrl5: {
      type: 'string',
      default: ''
    },
    adsUrl1: {
      type: 'string'
    },
    adsTarget1: {
      type: 'boolean'
    },
    adsXfn1: {
      type: 'string'
    },
    adsMediaId1: {
      type: 'number',
      default: 0
    },
    adsMediaUrl1: {
      type: 'string',
      default: ''
    },
    adsUrl2: {
      type: 'string'
    },
    adsTarget2: {
      type: 'boolean'
    },
    adsXfn2: {
      type: 'string'
    },
    adsMediaId2: {
      type: 'number',
      default: 0
    },
    adsMediaUrl2: {
      type: 'string',
      default: ''
    }
  },
  edit: withSelect((select, props) => {
    return {
      media1: props.attributes.mediaId1 ? select('core').getMedia(props.attributes.mediaId1) : undefined,
      media2: props.attributes.mediaId2 ? select('core').getMedia(props.attributes.mediaId2) : undefined,
      media3: props.attributes.mediaId3 ? select('core').getMedia(props.attributes.mediaId3) : undefined,
      media4: props.attributes.mediaId4 ? select('core').getMedia(props.attributes.mediaId4) : undefined,
      media5: props.attributes.mediaId5 ? select('core').getMedia(props.attributes.mediaId5) : undefined,
      adsMedia1: props.attributes.adsMediaId1 ? select('core').getMedia(props.attributes.adsMediaId1) : undefined,
      adsMedia2: props.attributes.adsMediaId2 ? select('core').getMedia(props.attributes.adsMediaId2) : undefined
    };
  })(BlockEdit),
  save: props => {
    return null;
  }
});
}();
/******/ })()
;
//# sourceMappingURL=main-slider.js.map