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

/***/ "./node_modules/@wordpress/icons/build-module/library/arrow-down.js":
/*!**************************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/arrow-down.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);

/**
 * WordPress dependencies
 */

const arrowDown = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrowDown);
//# sourceMappingURL=arrow-down.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/arrow-up.js":
/*!************************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/arrow-up.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);

/**
 * WordPress dependencies
 */

const arrowUp = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrowUp);
//# sourceMappingURL=arrow-up.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/desktop.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/desktop.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);

/**
 * WordPress dependencies
 */

const desktop = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (desktop);
//# sourceMappingURL=desktop.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/drag-handle.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/drag-handle.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);

/**
 * WordPress dependencies
 */

const dragHandle = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  width: "24",
  height: "24",
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (dragHandle);
//# sourceMappingURL=drag-handle.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/mobile.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/mobile.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);

/**
 * WordPress dependencies
 */

const mobile = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mobile);
//# sourceMappingURL=mobile.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/plus.js":
/*!********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/plus.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);

/**
 * WordPress dependencies
 */

const plus = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plus);
//# sourceMappingURL=plus.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/tablet.js":
/*!**********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/tablet.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);

/**
 * WordPress dependencies
 */

const tablet = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (tablet);
//# sourceMappingURL=tablet.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/trash.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/trash.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);

/**
 * WordPress dependencies
 */

const trash = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  fillRule: "evenodd",
  clipRule: "evenodd",
  d: "M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (trash);
//# sourceMappingURL=trash.js.map

/***/ }),

/***/ "./src/blocks/alert/index.js":
/*!***********************************!*\
  !*** ./src/blocks/alert/index.js ***!
  \***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _components_Typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/Typography */ "./src/components/Typography/index.js");
/* harmony import */ var _components_VisibilityControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/VisibilityControl */ "./src/components/VisibilityControl/index.js");
/* harmony import */ var _components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/FlatColorPicker */ "./src/components/FlatColorPicker/index.js");
/* harmony import */ var _components_Spacing__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/Spacing */ "./src/components/Spacing/index.js");
/* harmony import */ var _components_Border__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/Border */ "./src/components/Border/index.js");
/* harmony import */ var _utils_styles__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/styles */ "./src/utils/styles.js");






// Import custom components






(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)('kanews/alert', {
  apiVersion: 2,
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bilgi Kutusu', 'kanews'),
  icon: 'warning',
  category: 'kanews',
  attributes: {
    content: {
      type: 'string',
      default: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Alert içeriği buraya gelecek', 'kanews')
    },
    type: {
      type: 'string',
      default: 'success'
    },
    backgroundColor: {
      type: 'string',
      default: ''
    },
    typography: {
      type: 'object',
      default: {
        fontSize: '',
        fontFamily: '',
        fontWeight: '',
        lineHeight: '',
        letterSpacing: ''
      }
    },
    margin: {
      type: 'object',
      default: {}
    },
    padding: {
      type: 'object',
      default: {}
    },
    border: {
      type: 'object',
      default: {}
    },
    visibility: {
      type: 'object',
      default: {
        desktop: false,
        tablet: false,
        mobile: false
      }
    }
  },
  edit: ({
    attributes,
    setAttributes
  }) => {
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();
    const {
      content,
      type,
      backgroundColor,
      typography,
      margin,
      padding,
      border,
      visibility
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const wrapperProps = {
      className: ['kanews-alert-wrapper', ...visibilityClasses].filter(Boolean).join(' ')
    };
    const tabs = [{
      name: 'content',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçerik', 'kanews'),
      className: 'content-tab'
    }, {
      name: 'design',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tasarım', 'kanews'),
      className: 'design-tab'
    }, {
      name: 'visibility',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Görünürlük', 'kanews'),
      className: 'visibility-tab'
    }];
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TabPanel, {
      className: "kanews-tab-panel components-base-control",
      tabs: tabs
    }, tab => {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, tab.name === 'content' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.SelectControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Alert Türü', 'kanews'),
        value: type,
        options: [{
          label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Başarılı', 'kanews'),
          value: 'success'
        }, {
          label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bilgi', 'kanews'),
          value: 'info'
        }, {
          label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Uyarı', 'kanews'),
          value: 'warning'
        }, {
          label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Hata', 'kanews'),
          value: 'danger'
        }],
        onChange: value => setAttributes({
          type: value
        })
      })), tab.name === 'design' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tipografi', 'kanews')
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_5__["default"], {
        value: typography,
        showColor: true,
        onChange: value => setAttributes({
          typography: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Renkler', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_7__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Arka Plan Rengi', 'kanews'),
        value: backgroundColor || '',
        onChange: value => setAttributes({
          backgroundColor: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Border__WEBPACK_IMPORTED_MODULE_9__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kanews'),
        value: border,
        onChange: value => setAttributes({
          border: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Boşluklar', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dış Boşluk', 'kanews'),
        value: margin,
        onChange: value => setAttributes({
          margin: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İç Boşluk', 'kanews'),
        value: padding,
        onChange: value => setAttributes({
          padding: value
        })
      }))), tab.name === 'visibility' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_VisibilityControl__WEBPACK_IMPORTED_MODULE_6__["default"], {
        value: visibility,
        onChange: value => setAttributes({
          visibility: value
        })
      })));
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: `kanews-response kanews-response-${type} kanews-block-padding kanews-block-border kanews-block-margin`,
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getTypographyStyles)(typography),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(padding, 'padding'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getBorderStyles)(border, 'border'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(margin, 'margin'),
        backgroundColor: backgroundColor
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
      tagName: "div",
      value: content,
      onChange: value => setAttributes({
        content: value
      }),
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Alert içeriği buraya gelecek', 'kanews'),
      className: "kanews-response-content"
    })))));
  },
  save: ({
    attributes
  }) => {
    const {
      content,
      type,
      backgroundColor,
      typography,
      margin,
      padding,
      border,
      visibility
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const wrapperProps = {
      className: ['wp-block-kanews-alert', 'kanews-alert-wrapper', ...visibilityClasses].filter(Boolean).join(' ')
    };
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: `kanews-response kanews-response-${type} kanews-block-padding kanews-block-border kanews-block-margin`,
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getTypographyStyles)(typography),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(padding, 'padding'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getBorderStyles)(border, 'border'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(margin, 'margin'),
        backgroundColor: backgroundColor
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "kanews-response-content"
    }, content)));
  }
});

/***/ }),

/***/ "./src/blocks/bibliography/editor.scss":
/*!*********************************************!*\
  !*** ./src/blocks/bibliography/editor.scss ***!
  \*********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/blocks/bibliography/index.js":
/*!******************************************!*\
  !*** ./src/blocks/bibliography/index.js ***!
  \******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./style.scss */ "./src/blocks/bibliography/style.scss");
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./editor.scss */ "./src/blocks/bibliography/editor.scss");
/* harmony import */ var _components_repeater__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/repeater */ "./src/components/repeater/index.js");
/* harmony import */ var _components_VisibilityControl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/VisibilityControl */ "./src/components/VisibilityControl/index.js");
/* harmony import */ var _components_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/Typography */ "./src/components/Typography/index.js");
/* harmony import */ var _components_IconPicker__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/IconPicker */ "./src/components/IconPicker/index.js");
/* harmony import */ var _components_Spacing__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/Spacing */ "./src/components/Spacing/index.js");
/* harmony import */ var _components_Border__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/Border */ "./src/components/Border/index.js");
/* harmony import */ var _utils_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/styles */ "./src/utils/styles.js");
















(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)('kanews/bibliography', {
  apiVersion: 2,
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynakça', 'kanews'),
  category: 'kanews',
  icon: 'book-alt',
  supports: {
    html: false,
    align: ['wide', 'full']
  },
  attributes: {
    sources: {
      type: 'array',
      default: []
    },
    linkTypography: {
      type: 'object',
      default: {}
    },
    margin: {
      type: 'object',
      default: {}
    },
    padding: {
      type: 'object',
      default: {}
    },
    border: {
      type: 'object',
      default: {}
    },
    visibility: {
      type: 'object',
      default: {
        desktop: false,
        tablet: false,
        mobile: false
      }
    }
  },
  edit: ({
    attributes,
    setAttributes
  }) => {
    const {
      sources,
      linkTypography,
      margin,
      padding,
      border,
      visibility
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();
    const wrapperProps = {
      className: ['kanews-post-sources', 'kanews-block-margin', ...visibilityClasses].filter(Boolean).join(' '),
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getSpacingStyles)(margin, 'margin')
      }
    };
    const repeaterFields = [{
      name: 'text',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynak Metni', 'kanews'),
      type: 'text',
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynak metni...', 'kanews')
    }, {
      name: 'url',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynak Linki', 'kanews'),
      type: 'text',
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('https://...', 'kanews')
    }, {
      name: 'icon',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynak İkonu', 'kanews'),
      type: 'icon',
      component: _components_IconPicker__WEBPACK_IMPORTED_MODULE_11__["default"]
    }];
    const tabs = [{
      name: 'content',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçerik', 'kanews'),
      className: 'content-tab'
    }, {
      name: 'design',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tasarım', 'kanews'),
      className: 'design-tab'
    }, {
      name: 'visibility',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Görünürlük', 'kanews'),
      className: 'visibility-tab'
    }];
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TabPanel, {
      className: "kanews-tab-panel",
      tabs: tabs
    }, tab => {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, tab.name === 'content' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_repeater__WEBPACK_IMPORTED_MODULE_8__["default"], {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynaklar', 'kanews'),
        fields: repeaterFields,
        items: sources,
        onAdd: () => {
          const newSources = [...sources, {
            id: Date.now(),
            text: 'Kanews',
            url: '',
            icon: 'icon-logout'
          }];
          setAttributes({
            sources: newSources
          });
        },
        onRemove: index => {
          const newSources = [...sources];
          newSources.splice(index, 1);
          setAttributes({
            sources: newSources
          });
        },
        onChange: (index, attribute, value) => {
          const newSources = [...sources];
          newSources[index] = {
            ...newSources[index],
            [attribute]: value
          };
          setAttributes({
            sources: newSources
          });
        },
        addButtonText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynak Ekle', 'kanews'),
        emptyMessage: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Henüz kaynak eklenmemiş', 'kanews')
      })), tab.name === 'design' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tipografi', 'kanews')
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_10__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bağlantı Tipografisi', 'kanews'),
        value: linkTypography,
        onChange: value => setAttributes({
          linkTypography: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Border__WEBPACK_IMPORTED_MODULE_13__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kanews'),
        value: border,
        onChange: value => setAttributes({
          border: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Boşluklar', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_12__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dış Boşluk', 'kanews'),
        value: margin,
        onChange: value => setAttributes({
          margin: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_12__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İç Boşluk', 'kanews'),
        value: padding,
        onChange: value => setAttributes({
          padding: value
        })
      }))), tab.name === 'visibility' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_VisibilityControl__WEBPACK_IMPORTED_MODULE_9__["default"], {
        value: visibility,
        onChange: value => setAttributes({
          visibility: value
        })
      })));
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, sources.map((source, index) => source.url ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: index,
      className: "kanews-post-source d-flex align-items-center kanews-block-border",
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getBorderStyles)(border, 'border')
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
      href: source.url,
      target: "_blank",
      rel: "noopener noreferrer",
      className: 'kanews-source-link kanews-block-padding',
      style: {
        ...linkTypography,
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getSpacingStyles)(padding, 'padding')
      }
    }, source.icon && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: source.icon
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "kanews-source-text"
    }, source.text))) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: index,
      className: "kanews-post-source d-flex align-items-center kanews-block-border",
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getBorderStyles)(border, 'border')
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "kanews-source-link kanews-block-padding",
      style: {
        ...linkTypography,
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getSpacingStyles)(padding, 'padding')
      }
    }, source.icon && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: source.icon
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "kanews-source-text"
    }, source.text)))), sources.length === 0 && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Placeholder, {
      icon: "book-alt",
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynakça', 'kanews'),
      instructions: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynakça içeriğini buraya ekleyin.', 'kanews')
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
      isPrimary: true,
      onClick: () => setAttributes({
        sources: [{
          id: Date.now(),
          text: 'Kanews',
          url: '',
          icon: 'icon-logout'
        }]
      })
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kaynak Ekle', 'kanews'))))));
  },
  save: ({
    attributes
  }) => {
    const {
      sources,
      linkTypography,
      margin,
      padding,
      border,
      visibility
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const wrapperProps = {
      className: ['wp-block-kanews-bibliography', 'kanews-post-sources', 'kanews-block-margin', ...visibilityClasses].filter(Boolean).join(' '),
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getSpacingStyles)(margin, 'margin')
      }
    };
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, sources.map((source, index) => source.url ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: index,
      className: "kanews-post-source d-flex justify-content-between align-items-center kanews-block-border",
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getBorderStyles)(border, 'border')
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
      href: source.url,
      target: "_blank",
      rel: "noopener noreferrer",
      className: 'kanews-source-link kanews-block-padding',
      style: {
        ...linkTypography,
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getSpacingStyles)(padding, 'padding')
      }
    }, source.icon && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: source.icon
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "kanews-source-text"
    }, source.text))) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: index,
      className: "kanews-post-source d-flex align-items-center kanews-block-border",
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getBorderStyles)(border, 'border')
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "kanews-source-link kanews-block-padding",
      style: {
        ...linkTypography,
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_14__.getSpacingStyles)(padding, 'padding')
      }
    }, source.icon && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: source.icon
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "kanews-source-text"
    }, source.text)))));
  }
});

/***/ }),

/***/ "./src/blocks/bibliography/style.scss":
/*!********************************************!*\
  !*** ./src/blocks/bibliography/style.scss ***!
  \********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/blocks/button/index.js":
/*!************************************!*\
  !*** ./src/blocks/button/index.js ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _components_Typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/Typography */ "./src/components/Typography/index.js");
/* harmony import */ var _components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/FlatColorPicker */ "./src/components/FlatColorPicker/index.js");
/* harmony import */ var _components_VisibilityControl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/VisibilityControl */ "./src/components/VisibilityControl/index.js");
/* harmony import */ var _components_IconPicker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/IconPicker */ "./src/components/IconPicker/index.js");
/* harmony import */ var _utils_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/styles */ "./src/utils/styles.js");






// Import custom components





// Import typography helper

(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)('kanews/button', {
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Buton', 'kanews'),
  icon: 'button',
  category: 'kanews',
  attributes: {
    text: {
      type: 'string',
      default: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Buton Metni', 'kanews')
    },
    url: {
      type: 'string',
      default: '#'
    },
    type: {
      type: 'string',
      default: 'primary'
    },
    size: {
      type: 'string',
      default: 'default'
    },
    isFullWidth: {
      type: 'boolean',
      default: false
    },
    target: {
      type: 'boolean',
      default: false
    },
    icon: {
      type: 'string',
      default: ''
    },
    iconSpacing: {
      type: 'string',
      default: '8px'
    },
    margin: {
      type: 'object',
      default: {}
    },
    padding: {
      type: 'object',
      default: {}
    },
    backgroundColor: {
      type: 'string',
      default: ''
    },
    textColor: {
      type: 'string',
      default: ''
    },
    typography: {
      type: 'object',
      default: {
        fontSize: '',
        fontFamily: '',
        fontWeight: '',
        lineHeight: '',
        letterSpacing: ''
      }
    },
    visibility: {
      type: 'object',
      default: {
        desktop: false,
        tablet: false,
        mobile: false
      }
    }
  },
  edit: ({
    attributes,
    setAttributes
  }) => {
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();
    const {
      text,
      url,
      type,
      size,
      isFullWidth,
      target,
      icon,
      iconSpacing,
      margin,
      padding,
      backgroundColor,
      textColor,
      typography,
      visibility
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const wrapperProps = {
      className: ['kanews-btn-wrapper', 'kanews-block-margin', ...visibilityClasses].filter(Boolean).join(' '),
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_9__.getSpacingStyles)(margin, 'margin')
      }
    };
    const tabs = [{
      name: 'content',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçerik', 'kanews'),
      className: 'content-tab'
    }, {
      name: 'design',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tasarım', 'kanews'),
      className: 'design-tab'
    }, {
      name: 'visibility',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Görünürlük', 'kanews'),
      className: 'visibility-tab'
    }];
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TabPanel, {
      className: "kanews-tab-panel components-base-control",
      tabs: tabs
    }, tab => {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, tab.name === 'content' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TextControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Buton Metni', 'kanews'),
        value: text,
        onChange: value => setAttributes({
          text: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TextControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('URL', 'kanews'),
        value: url,
        onChange: value => setAttributes({
          url: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.SelectControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tür', 'kanews'),
        value: type,
        options: [{
          label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Birincil', 'kanews'),
          value: 'primary'
        }, {
          label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenar Çizgili', 'kanews'),
          value: 'o'
        }],
        onChange: value => setAttributes({
          type: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.SelectControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Boyut', 'kanews'),
        value: size,
        options: [{
          label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Varsayılan', 'kanews'),
          value: 'default'
        }, {
          label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Küçük', 'kanews'),
          value: 'sm'
        }],
        onChange: value => setAttributes({
          size: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tam Genişlik', 'kanews'),
        checked: isFullWidth,
        onChange: value => setAttributes({
          isFullWidth: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Yeni sekmede aç', 'kanews'),
        checked: target,
        onChange: value => setAttributes({
          target: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_IconPicker__WEBPACK_IMPORTED_MODULE_8__["default"], {
        value: icon,
        onChange: value => setAttributes({
          icon: value
        }),
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İkon Seç', 'kanews')
      })), tab.name === 'design' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_5__["default"], {
        value: typography,
        showColor: false,
        showTextAlign: false,
        showLineHeight: false,
        onChange: value => setAttributes({
          typography: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_6__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Birincil Renk', 'kanews'),
        value: backgroundColor || '',
        onChange: value => setAttributes({
          backgroundColor: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_6__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Metin Rengi', 'kanews'),
        value: textColor || '',
        onChange: value => setAttributes({
          textColor: value
        })
      }), icon && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TextControl, {
        type: "number",
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İkon Aralığı', 'kanews'),
        value: parseInt(iconSpacing),
        onChange: value => setAttributes({
          iconSpacing: value + 'px'
        }),
        help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İkon ile metin arasındaki boşluk (px)', 'kanews')
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.BoxControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Margin', 'kanews'),
        values: margin,
        onChange: value => setAttributes({
          margin: value
        }),
        units: [{
          value: 'px',
          label: 'px'
        }, {
          value: '%',
          label: '%'
        }, {
          value: 'em',
          label: 'em'
        }, {
          value: 'rem',
          label: 'rem'
        }]
      })), tab.name === 'visibility' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_VisibilityControl__WEBPACK_IMPORTED_MODULE_7__["default"], {
        value: visibility,
        onChange: value => setAttributes({
          visibility: value
        })
      })));
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: `kanews-btn kanews-btn-${type} kanews-btn-${size} ${isFullWidth ? 'kanews-btn-block' : ''}`,
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_9__.getTypographyStyles)(typography),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_9__.getSpacingStyles)(padding, 'padding')
      }
    }, icon && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: `fa ${icon}`,
      style: {
        marginRight: iconSpacing
      }
    }), text))));
  },
  save: ({
    attributes
  }) => {
    const {
      text,
      url,
      type,
      size,
      isFullWidth,
      target,
      icon,
      iconSpacing,
      margin,
      padding,
      backgroundColor,
      textColor,
      typography,
      visibility
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const wrapperProps = {
      className: ['kanews-btn-wrapper', 'kanews-block-margin', ...visibilityClasses].filter(Boolean).join(' '),
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_9__.getSpacingStyles)(margin, 'margin')
      }
    };
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
      href: url,
      className: `kanews-btn kanews-btn-${type} kanews-btn-${size} ${isFullWidth ? 'kanews-btn-block' : ''}`,
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_9__.getTypographyStyles)(typography),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_9__.getSpacingStyles)(padding, 'padding')
      },
      target: target ? '_blank' : undefined,
      rel: target ? 'noopener noreferrer' : undefined
    }, icon && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
      className: `fa ${icon}`,
      style: {
        marginRight: iconSpacing
      }
    }), text));
  }
});

/***/ }),

/***/ "./src/blocks/calculator/editor.scss":
/*!*******************************************!*\
  !*** ./src/blocks/calculator/editor.scss ***!
  \*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/blocks/calculator/index.js":
/*!****************************************!*\
  !*** ./src/blocks/calculator/index.js ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./style.scss */ "./src/blocks/calculator/style.scss");
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./editor.scss */ "./src/blocks/calculator/editor.scss");









(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)('kanews/calculator', {
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Hesaplayıcılar', 'kanews'),
  icon: 'calculator',
  category: 'kanews',
  attributes: {
    type: {
      type: 'string',
      default: 'doviz'
    },
    showTabs: {
      type: 'boolean',
      default: false
    },
    excludedTypes: {
      type: 'array',
      default: []
    },
    index: {
      type: 'string',
      default: ''
    }
  },
  supports: {
    html: false,
    align: ['wide', 'full']
  },
  edit: function Edit({
    attributes,
    setAttributes
  }) {
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();
    const [activeTab, setActiveTab] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_5__.useState)(attributes.type);
    const calculatorTypes = [{
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Döviz', 'kanews'),
      value: 'doviz'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kripto', 'kanews'),
      value: 'coin'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Emtia', 'kanews'),
      value: 'emtia'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Burç', 'kanews'),
      value: 'burc'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('VKİ', 'kanews'),
      value: 'vki'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kredi', 'kanews'),
      value: 'kredi'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Birikim', 'kanews'),
      value: 'birikim'
    }];
    const filteredTypes = calculatorTypes.filter(type => !attributes.excludedTypes.includes(type.value));
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Hesaplayıcı Ayarları', 'kanews')
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.SelectControl, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Hesaplayıcı Tipi', 'kanews'),
      value: attributes.type,
      options: filteredTypes,
      onChange: value => setAttributes({
        type: value
      })
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Seçenekleri Göster', 'kanews'),
      checked: attributes.showTabs,
      onChange: value => setAttributes({
        showTabs: value
      })
    }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_6___default()), {
      block: "kanews/calculator",
      attributes: {
        type: attributes.type,
        showTabs: attributes.showTabs,
        excludedTypes: attributes.excludedTypes,
        index: attributes.index
      }
    })));
  },
  save: function Save() {
    return null;
  }
});

/***/ }),

/***/ "./src/blocks/calculator/style.scss":
/*!******************************************!*\
  !*** ./src/blocks/calculator/style.scss ***!
  \******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/blocks/faq-item/index.js":
/*!**************************************!*\
  !*** ./src/blocks/faq-item/index.js ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _components_Typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/Typography */ "./src/components/Typography/index.js");
/* harmony import */ var _components_VisibilityControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/VisibilityControl */ "./src/components/VisibilityControl/index.js");
/* harmony import */ var _components_Spacing__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/Spacing */ "./src/components/Spacing/index.js");
/* harmony import */ var _components_Border__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/Border */ "./src/components/Border/index.js");
/* harmony import */ var _components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/FlatColorPicker */ "./src/components/FlatColorPicker/index.js");
/* harmony import */ var _utils_styles__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/styles */ "./src/utils/styles.js");






// Import custom components






(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)('kanews/faq-item', {
  apiVersion: 2,
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('SSS Öğesi', 'kanews'),
  icon: 'editor-help',
  category: 'kanews',
  parent: ['kanews/faq'],
  attributes: {
    question: {
      type: 'string',
      default: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Soru', 'kanews')
    },
    questionTypography: {
      type: 'object',
      default: {}
    },
    answerTypography: {
      type: 'object',
      default: {}
    },
    questionBackground: {
      type: 'string',
      default: ''
    },
    answerBackground: {
      type: 'string',
      default: ''
    },
    margin: {
      type: 'object',
      default: {}
    },
    padding: {
      type: 'object',
      default: {}
    },
    border: {
      type: 'object',
      default: {}
    },
    visibility: {
      type: 'object',
      default: {
        desktop: false,
        tablet: false,
        mobile: false
      }
    },
    accordionId: {
      type: 'string',
      default: ''
    },
    itemId: {
      type: 'string',
      default: ''
    }
  },
  edit: ({
    attributes,
    setAttributes
  }) => {
    const {
      question,
      questionTypography,
      answerTypography,
      questionBackground,
      answerBackground,
      margin,
      padding,
      border,
      visibility,
      accordionId,
      itemId
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();
    const wrapperProps = {
      className: ['collapse-item', 'kanews-block-margin', 'kanews-block-border', 'kanews-block-padding', ...visibilityClasses].filter(Boolean).join(' '),
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(margin, 'margin'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(padding, 'padding'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getBorderStyles)(border, 'border')
      }
    };

    // Use existing itemId or generate a new one
    const currentItemId = itemId || `faq-item-${blockProps.id}`;
    if (!itemId) {
      setAttributes({
        itemId: currentItemId
      });
    }
    const tabs = [{
      name: 'content',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçerik', 'kanews'),
      className: 'content-tab'
    }, {
      name: 'design',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tasarım', 'kanews'),
      className: 'design-tab'
    }, {
      name: 'visibility',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Görünürlük', 'kanews'),
      className: 'visibility-tab'
    }];
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TabPanel, {
      className: "kanews-tab-panel",
      tabs: tabs
    }, tab => {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, tab.name === 'content' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
        tagName: "h3",
        value: question,
        onChange: value => setAttributes({
          question: value
        }),
        placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Soru', 'kanews'),
        className: "collapse-item-header-title"
      })), tab.name === 'design' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tipografi', 'kanews')
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_5__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Soru', 'kanews'),
        value: questionTypography,
        onChange: value => setAttributes({
          questionTypography: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_5__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Cevap', 'kanews'),
        value: answerTypography,
        onChange: value => setAttributes({
          answerTypography: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Arkaplan', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_9__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Soru Arkaplanı', 'kanews'),
        value: questionBackground,
        onChange: value => setAttributes({
          questionBackground: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_9__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Cevap Arkaplanı', 'kanews'),
        value: answerBackground,
        onChange: value => setAttributes({
          answerBackground: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Border__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kanews'),
        value: border,
        onChange: value => setAttributes({
          border: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Boşluklar', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_7__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dış Boşluk', 'kanews'),
        value: margin,
        onChange: value => setAttributes({
          margin: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_7__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İç Boşluk', 'kanews'),
        value: padding,
        onChange: value => setAttributes({
          padding: value
        })
      }))), tab.name === 'visibility' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_VisibilityControl__WEBPACK_IMPORTED_MODULE_6__["default"], {
        value: visibility,
        onChange: value => setAttributes({
          visibility: value
        })
      })));
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "collapse-item-header",
      id: `heading-${currentItemId}`,
      style: {
        backgroundColor: questionBackground
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      className: "collapse-btn collapsed",
      type: "button",
      "data-toggle": "collapse",
      "data-target": `#collapse-${currentItemId}`,
      "aria-expanded": "false",
      "aria-controls": `collapse-${currentItemId}`
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
      tagName: "h3",
      value: question,
      onChange: value => setAttributes({
        question: value
      }),
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Soru', 'kanews'),
      className: "collapse-item-header-title",
      style: (0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getTypographyStyles)(questionTypography)
    }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      id: `collapse-${currentItemId}`,
      className: "collapse",
      "aria-labelledby": `heading-${currentItemId}`,
      "data-parent": accordionId
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "collapse-item-body",
      style: {
        backgroundColor: answerBackground
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "collapse-item-body-content",
      style: (0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getTypographyStyles)(answerTypography)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
      allowedBlocks: ['core/paragraph', 'core/heading', 'core/list', 'core/image', 'core/quote'],
      template: [['core/paragraph', {
        placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Cevap ekleyin...', 'kanews')
      }]],
      renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.ButtonBlockAppender
    })))))));
  },
  save: ({
    attributes
  }) => {
    const {
      question,
      questionTypography,
      answerTypography,
      questionBackground,
      answerBackground,
      margin,
      padding,
      border,
      visibility,
      accordionId,
      itemId
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const wrapperProps = {
      className: ['collapse-item', 'kanews-block-margin', 'kanews-block-border', 'kanews-block-padding', ...visibilityClasses].filter(Boolean).join(' '),
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(margin, 'margin'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(padding, 'padding'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getBorderStyles)(border, 'border')
      }
    };
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "collapse-item-header",
      id: `heading-${itemId}`,
      style: {
        backgroundColor: questionBackground
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      className: "collapse-btn collapsed",
      type: "button",
      "data-toggle": "collapse",
      "data-target": `#collapse-${itemId}`,
      "aria-expanded": "false",
      "aria-controls": `collapse-${itemId}`
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText.Content, {
      tagName: "h3",
      value: question,
      className: "collapse-item-header-title",
      style: (0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getTypographyStyles)(questionTypography)
    }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      id: `collapse-${itemId}`,
      className: "collapse",
      "aria-labelledby": `heading-${itemId}`,
      "data-parent": accordionId
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "collapse-item-body",
      style: {
        backgroundColor: answerBackground
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "collapse-item-body-content",
      style: (0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getTypographyStyles)(answerTypography)
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.Content, null)))));
  }
});

/***/ }),

/***/ "./src/blocks/faq/index.js":
/*!*********************************!*\
  !*** ./src/blocks/faq/index.js ***!
  \*********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _components_Typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/Typography */ "./src/components/Typography/index.js");
/* harmony import */ var _components_VisibilityControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/VisibilityControl */ "./src/components/VisibilityControl/index.js");
/* harmony import */ var _components_Spacing__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/Spacing */ "./src/components/Spacing/index.js");
/* harmony import */ var _components_Border__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/Border */ "./src/components/Border/index.js");
/* harmony import */ var _components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/FlatColorPicker */ "./src/components/FlatColorPicker/index.js");
/* harmony import */ var _utils_styles__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/styles */ "./src/utils/styles.js");






// Import custom components







(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)('kanews/faq', {
  apiVersion: 2,
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('SSS', 'kanews'),
  category: 'kanews',
  icon: 'editor-help',
  supports: {
    html: false,
    align: ['wide', 'full']
  },
  attributes: {
    title: {
      type: 'string',
      default: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sık Sorulan Sorular', 'kanews')
    },
    showTitle: {
      type: 'boolean',
      default: true
    },
    enableSchema: {
      type: 'boolean',
      default: true
    },
    typography: {
      type: 'object',
      default: {}
    },
    background: {
      type: 'string',
      default: ''
    },
    titleSpacing: {
      type: 'number',
      default: ''
    },
    margin: {
      type: 'object',
      default: {}
    },
    padding: {
      type: 'object',
      default: {}
    },
    border: {
      type: 'object',
      default: {}
    },
    visibility: {
      type: 'object',
      default: {
        desktop: false,
        tablet: false,
        mobile: false
      }
    },
    accordionId: {
      type: 'string',
      default: ''
    }
  },
  edit: ({
    attributes,
    setAttributes
  }) => {
    const {
      title,
      showTitle,
      enableSchema,
      typography,
      background,
      titleSpacing,
      margin,
      padding,
      border,
      visibility,
      accordionId
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();
    const wrapperProps = {
      className: ['kanews-faq-wrapper', 'kanews-block-margin', 'kanews-block-border', 'kanews-block-padding', ...visibilityClasses].filter(Boolean).join(' '),
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(margin, 'margin'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(padding, 'padding'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getBorderStyles)(border, 'border'),
        backgroundColor: background
      }
    };

    // Use existing accordionId or generate a new one
    const currentAccordionId = accordionId || `kanews-faq-accordion-${blockProps.id}`;
    if (!accordionId) {
      setAttributes({
        accordionId: currentAccordionId
      });
    }
    const tabs = [{
      name: 'content',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçerik', 'kanews'),
      className: 'content-tab'
    }, {
      name: 'design',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tasarım', 'kanews'),
      className: 'design-tab'
    }, {
      name: 'visibility',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Görünürlük', 'kanews'),
      className: 'visibility-tab'
    }];
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TabPanel, {
      className: "kanews-tab-panel",
      tabs: tabs
    }, tab => {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, tab.name === 'content' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
        tagName: "h2",
        value: title,
        onChange: value => setAttributes({
          title: value
        }),
        placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('SSS Başlığı', 'kanews'),
        className: "kanews-faq-title"
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Başlığı Göster', 'kanews'),
        checked: showTitle,
        onChange: value => setAttributes({
          showTitle: value
        }),
        help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('SSS bloğunun başlığını gösterir veya gizler.', 'kanews')
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Schema Desteği', 'kanews'),
        checked: enableSchema,
        onChange: value => setAttributes({
          enableSchema: value
        }),
        help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('SSS bloğunu arama motorları için yapılandırılmış veri olarak işaretler.', 'kanews')
      })), tab.name === 'design' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tipografi', 'kanews')
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_5__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Başlık Tipografisi', 'kanews'),
        value: typography,
        onChange: value => setAttributes({
          typography: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_7__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Başlık Boşluğu', 'kanews'),
        value: titleSpacing,
        onChange: value => setAttributes({
          titleSpacing: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Arkaplan', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_9__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Arkaplan Rengi', 'kanews'),
        value: background,
        onChange: value => setAttributes({
          background: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Border__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kanews'),
        value: border,
        onChange: value => setAttributes({
          border: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Boşluklar', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_7__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dış Boşluk', 'kanews'),
        value: margin,
        onChange: value => setAttributes({
          margin: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_7__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İç Boşluk', 'kanews'),
        value: padding,
        onChange: value => setAttributes({
          padding: value
        })
      }))), tab.name === 'visibility' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_VisibilityControl__WEBPACK_IMPORTED_MODULE_6__["default"], {
        value: visibility,
        onChange: value => setAttributes({
          visibility: value
        })
      })));
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, showTitle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
      tagName: "h2",
      value: title,
      onChange: value => setAttributes({
        title: value
      }),
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('SSS Başlığı', 'kanews'),
      className: "kanews-faq-title kanews-block-margin",
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getTypographyStyles)(typography),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(titleSpacing, 'margin')
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "collapse",
      id: currentAccordionId,
      role: "tablist",
      "aria-multiselectable": "true"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
      allowedBlocks: ['kanews/faq-item'],
      template: [['kanews/faq-item', {
        accordionId: currentAccordionId
      }], ['kanews/faq-item', {
        accordionId: currentAccordionId
      }], ['kanews/faq-item', {
        accordionId: currentAccordionId
      }]],
      templateLock: false
    })), enableSchema && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("script", {
      type: "application/ld+json"
    }, JSON.stringify({
      '@context': 'https://schema.org',
      '@type': 'FAQPage',
      'mainEntity': [] // This will be populated by the server-side render
    })))));
  },
  save: ({
    attributes
  }) => {
    const {
      title,
      showTitle,
      enableSchema,
      typography,
      background,
      titleSpacing,
      margin,
      padding,
      border,
      visibility,
      accordionId
    } = attributes;
    const visibilityClasses = [visibility?.desktop ? 'hidden-desktop' : '', visibility?.tablet ? 'hidden-tablet' : '', visibility?.mobile ? 'hidden-mobile' : ''].filter(Boolean);
    const wrapperProps = {
      className: ['kanews-faq-wrapper', 'kanews-block-margin', 'kanews-block-border', 'kanews-block-padding', ...visibilityClasses].filter(Boolean).join(' '),
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(margin, 'margin'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(padding, 'padding'),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getBorderStyles)(border, 'border'),
        backgroundColor: background
      }
    };
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...wrapperProps
    }, showTitle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText.Content, {
      tagName: "h2",
      value: title,
      className: "kanews-faq-title kanews-block-margin",
      style: {
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getTypographyStyles)(typography),
        ...(0,_utils_styles__WEBPACK_IMPORTED_MODULE_10__.getSpacingStyles)(titleSpacing, 'margin')
      }
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "collapse",
      id: accordionId,
      role: "tablist",
      "aria-multiselectable": "true"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.Content, null)), enableSchema && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("script", {
      type: "application/ld+json"
    }, JSON.stringify({
      '@context': 'https://schema.org',
      '@type': 'FAQPage',
      'mainEntity': [] // This will be populated by the server-side render
    })));
  }
});

/***/ }),

/***/ "./src/blocks/gallery/editor.scss":
/*!****************************************!*\
  !*** ./src/blocks/gallery/editor.scss ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/blocks/gallery/index.js":
/*!*************************************!*\
  !*** ./src/blocks/gallery/index.js ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _components_ResponsiveControl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/ResponsiveControl */ "./src/components/ResponsiveControl/index.js");
/* harmony import */ var _components_VisibilityControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/VisibilityControl */ "./src/components/VisibilityControl/index.js");
/* harmony import */ var _components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/FlatColorPicker */ "./src/components/FlatColorPicker/index.js");
/* harmony import */ var _components_Typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/Typography */ "./src/components/Typography/index.js");
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./style.scss */ "./src/blocks/gallery/style.scss");
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./editor.scss */ "./src/blocks/gallery/editor.scss");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _utils_styles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/styles */ "./src/utils/styles.js");














// Front-end için numaralandırma scripti
const galleryNumberingScript = `
    document.addEventListener('DOMContentLoaded', function() {
        const updateGalleryNumbers = () => {
            const galleries = document.querySelectorAll('.kanews-gallery');
            galleries.forEach(gallery => {
                const items = gallery.querySelectorAll('.gallery-item');
                const totalItems = items.length;
                
                items.forEach((item, index) => {
                    const numberSpan = item.querySelector('.gallery-item-number');
                    const totalSpan = item.querySelector('.gallery-item-total');
                    
                    if (numberSpan && totalSpan) {
                        numberSpan.textContent = index + 1;
                        totalSpan.textContent = '| ' + totalItems;
                    }
                });
            });
        };

        // Sayfa yüklendiğinde ve her değişiklikte numaraları güncelle
        updateGalleryNumbers();
        
        // MutationObserver ile DOM değişikliklerini izle
        const observer = new MutationObserver(updateGalleryNumbers);
        const config = { childList: true, subtree: true };
        
        document.querySelectorAll('.kanews-gallery').forEach(gallery => {
            observer.observe(gallery, config);
        });
    });
`;

// Gallery Item Block
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)('kanews/gallery-item', {
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Galeri Öğesi', 'kanews'),
  category: 'kanews',
  parent: ['kanews/gallery'],
  attributes: {
    url: {
      type: 'string',
      source: 'attribute',
      selector: 'img',
      attribute: 'src'
    },
    id: {
      type: 'number',
      source: 'attribute',
      selector: 'img',
      attribute: 'data-id'
    },
    alt: {
      type: 'string',
      source: 'attribute',
      selector: 'img',
      attribute: 'alt'
    },
    title: {
      type: 'string',
      source: 'html',
      selector: '.gallery-item-title'
    },
    titleTag: {
      type: 'string',
      default: 'h3'
    },
    typography: {
      type: 'object',
      default: {
        fontSize: '',
        fontFamily: '',
        fontWeight: '',
        lineHeight: '',
        letterSpacing: '',
        textTransform: 'none',
        fontStyle: 'normal',
        textDecoration: 'none',
        textAlign: 'left',
        color: ''
      }
    }
  },
  edit: ({
    attributes,
    setAttributes,
    clientId
  }) => {
    const {
      url,
      id,
      alt,
      title,
      titleTag,
      typography
    } = attributes;
    const onSelectImage = image => {
      setAttributes({
        url: image.url,
        id: image.id,
        alt: image.alt
      });
    };
    const titleStyle = (0,_utils_styles__WEBPACK_IMPORTED_MODULE_12__.getTypographyStyles)(typography);
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Başlık Ayarları', 'kanews')
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.SelectControl, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Başlık Etiketi', 'kanews'),
      value: titleTag,
      options: [{
        label: 'H1',
        value: 'h1'
      }, {
        label: 'H2',
        value: 'h2'
      }, {
        label: 'H3',
        value: 'h3'
      }, {
        label: 'H4',
        value: 'h4'
      }, {
        label: 'H5',
        value: 'h5'
      }, {
        label: 'H6',
        value: 'h6'
      }, {
        label: 'P',
        value: 'p'
      }],
      onChange: value => setAttributes({
        titleTag: value
      })
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_8__["default"], {
      value: typography,
      onChange: value => setAttributes({
        typography: value
      }),
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Başlık Tipografisi', 'kanews')
    }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item-header"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item-counter"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "gallery-item-number"
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "gallery-item-total"
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaUploadCheck, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaUpload, {
      onSelect: onSelectImage,
      allowedTypes: ['image'],
      value: id,
      render: ({
        open
      }) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
        onClick: open,
        className: !url ? 'components-button is-primary' : 'components-button is-secondary'
      }, !url ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Resim Seç', 'kanews') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Resmi Değiştir', 'kanews'))
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
      tagName: titleTag,
      className: "gallery-item-title",
      value: title,
      onChange: value => setAttributes({
        title: value
      }),
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Başlık...', 'kanews'),
      style: titleStyle
    })), url && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item-image"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: url,
      alt: alt,
      "data-id": id
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item-content"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
      allowedBlocks: ['core/paragraph', 'core/heading', 'core/list', 'core/quote', 'core/image'],
      template: [['core/paragraph', {
        placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('İçerik ekleyin...', 'kanews')
      }]],
      renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.ButtonBlockAppender
    })));
  },
  save: ({
    attributes
  }) => {
    const {
      url,
      id,
      alt,
      title,
      titleTag,
      typography
    } = attributes;
    const titleStyle = (0,_utils_styles__WEBPACK_IMPORTED_MODULE_12__.getTypographyStyles)(typography, true);
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item-header"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item-counter"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "gallery-item-number"
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "gallery-item-total"
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText.Content, {
      tagName: titleTag,
      className: "gallery-item-title",
      value: title,
      style: titleStyle
    })), url && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item-image"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: url,
      alt: alt,
      "data-id": id
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-item-content"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.Content, null)));
  }
});

// Main Gallery Block
(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)('kanews/gallery', {
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Galeri', 'kanews'),
  category: 'kanews',
  icon: 'format-gallery',
  supports: {
    html: false,
    align: ['wide', 'full']
  },
  attributes: {
    columnsDesktop: {
      type: 'number',
      default: 1
    },
    columnsTablet: {
      type: 'number',
      default: 1
    },
    columnsMobile: {
      type: 'number',
      default: 1
    },
    gridGap: {
      type: 'string',
      default: '1rem'
    },
    imageHeight: {
      type: 'string',
      default: 'auto'
    },
    headerBackground: {
      type: 'string',
      default: ''
    },
    contentBackground: {
      type: 'string',
      default: ''
    },
    visibility: {
      type: 'object',
      default: {
        desktop: false,
        tablet: false,
        mobile: false
      }
    }
  },
  edit: ({
    attributes,
    setAttributes
  }) => {
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();
    const {
      columnsDesktop,
      columnsTablet,
      columnsMobile,
      gridGap,
      imageHeight,
      headerBackground,
      contentBackground,
      visibility
    } = attributes;
    const gridStyle = {
      '--columns-desktop': columnsDesktop.toString(),
      '--columns-tablet': columnsTablet.toString(),
      '--columns-mobile': columnsMobile.toString(),
      '--gap': gridGap,
      '--image-height': imageHeight,
      '--kan-placeholder-bg': headerBackground,
      '--kan-bg-white-color': contentBackground
    };
    const updateItemNumbers = () => {
      const galleryItems = document.querySelectorAll('.gallery-item');
      const totalItems = galleryItems.length;
      galleryItems.forEach((item, index) => {
        const numberSpan = item.querySelector('.gallery-item-number');
        const totalSpan = item.querySelector('.gallery-item-total');
        if (numberSpan && totalSpan) {
          numberSpan.textContent = `${index + 1}`;
          totalSpan.textContent = `| ${totalItems}`;
        }
      });
    };

    // İlk yüklemede ve her değişiklikte numaraları güncelle
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_11__.useEffect)(() => {
      updateItemNumbers();
    });
    const tabs = [{
      name: 'design',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Tasarım', 'kanews'),
      className: 'design-tab'
    }, {
      name: 'visibility',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Görünürlük', 'kanews'),
      className: 'visibility-tab'
    }];
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TabPanel, {
      className: "kanews-tab-panel",
      tabs: tabs
    }, tab => {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, tab.name === 'design' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_ResponsiveControl__WEBPACK_IMPORTED_MODULE_5__["default"], {
        value: {
          desktop: columnsDesktop,
          tablet: columnsTablet,
          mobile: columnsMobile
        },
        onChange: values => {
          setAttributes({
            columnsDesktop: values.desktop,
            columnsTablet: values.tablet,
            columnsMobile: values.mobile
          });
        },
        min: 1,
        max: 6,
        defaultValues: {
          desktop: 3,
          tablet: 2,
          mobile: 1
        }
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.SelectControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Grid Boşluğu', 'kanews'),
        value: gridGap,
        options: [{
          label: 'Küçük',
          value: '0.5rem'
        }, {
          label: 'Normal',
          value: '1rem'
        }, {
          label: 'Büyük',
          value: '2rem'
        }],
        onChange: value => setAttributes({
          gridGap: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.SelectControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Resim Yüksekliği', 'kanews'),
        value: imageHeight,
        options: [{
          label: 'Orijinal',
          value: 'auto'
        }, {
          label: 'Küçük',
          value: '150px'
        }, {
          label: 'Normal',
          value: '200px'
        }, {
          label: 'Büyük',
          value: '300px'
        }],
        onChange: value => setAttributes({
          imageHeight: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "components-base-control"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
        className: "components-base-control__label"
      }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Header Arkaplan Rengi', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_7__["default"], {
        value: headerBackground,
        onChange: value => setAttributes({
          headerBackground: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "components-base-control"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
        className: "components-base-control__label"
      }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('İçerik Arkaplan Rengi', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_7__["default"], {
        value: contentBackground,
        onChange: value => setAttributes({
          contentBackground: value
        })
      }))), tab.name === 'visibility' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_VisibilityControl__WEBPACK_IMPORTED_MODULE_6__["default"], {
        value: visibility,
        onChange: value => setAttributes({
          visibility: value
        })
      })));
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: `kanews-gallery ${visibility.desktop ? 'hidden-desktop' : ''} ${visibility.tablet ? 'hidden-tablet' : ''} ${visibility.mobile ? 'hidden-mobile' : ''}`,
      style: gridStyle
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-grid"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
      allowedBlocks: ['kanews/gallery-item'],
      template: [['kanews/gallery-item']],
      renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.ButtonBlockAppender,
      onChange: () => {
        setTimeout(updateItemNumbers, 0);
      }
    }))));
  },
  save: ({
    attributes
  }) => {
    const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps.save();
    const {
      columnsDesktop,
      columnsTablet,
      columnsMobile,
      gridGap,
      imageHeight,
      headerBackground,
      contentBackground,
      visibility
    } = attributes;
    const gridStyle = {
      '--columns-desktop': columnsDesktop.toString(),
      '--columns-tablet': columnsTablet.toString(),
      '--columns-mobile': columnsMobile.toString(),
      '--gap': gridGap,
      '--image-height': imageHeight,
      '--kan-placeholder-bg': headerBackground,
      '--kan-bg-white-color': contentBackground
    };
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: `kanews-gallery ${visibility.desktop ? 'hidden-desktop' : ''} ${visibility.tablet ? 'hidden-tablet' : ''} ${visibility.mobile ? 'hidden-mobile' : ''}`,
      style: gridStyle
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "gallery-grid"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.Content, null)))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("script", {
      dangerouslySetInnerHTML: {
        __html: galleryNumberingScript
      }
    }));
  }
});

/***/ }),

/***/ "./src/blocks/gallery/style.scss":
/*!***************************************!*\
  !*** ./src/blocks/gallery/style.scss ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/blocks/related-posts/editor.scss":
/*!**********************************************!*\
  !*** ./src/blocks/related-posts/editor.scss ***!
  \**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/blocks/related-posts/index.js":
/*!*******************************************!*\
  !*** ./src/blocks/related-posts/index.js ***!
  \*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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 _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/blocks/related-posts/style.scss");
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/blocks/related-posts/editor.scss");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data");
/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _components_PostSearch__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/PostSearch */ "./src/components/PostSearch/index.js");
/* harmony import */ var _components_ToggleSwitch__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/ToggleSwitch */ "./src/components/ToggleSwitch/index.js");
/* harmony import */ var _components_VisibilityControl__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/VisibilityControl */ "./src/components/VisibilityControl/index.js");
/* harmony import */ var _components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/FlatColorPicker */ "./src/components/FlatColorPicker/index.js");
/* harmony import */ var _components_Typography__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/Typography */ "./src/components/Typography/index.js");
/* harmony import */ var _utils_Loading__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/Loading */ "./src/utils/Loading/index.js");
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_15__);

// Import styles















(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__.registerBlockType)('kanews/related-posts', {
  apiVersion: 2,
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('İlgili Yazı', 'kanews'),
  icon: 'admin-links',
  category: 'kanews',
  supports: {
    html: false,
    align: ['wide', 'full']
  },
  attributes: {
    title: {
      type: 'string',
      default: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('İlginizi Çekebilir', 'kanews')
    },
    postCount: {
      type: 'number',
      default: 3
    },
    selectedPosts: {
      type: 'array',
      default: []
    },
    headingTag: {
      type: 'string',
      default: 'div'
    },
    detailText: {
      type: 'string',
      default: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Haberi görüntüle', 'kanews')
    },
    showDetailText: {
      type: 'boolean',
      default: true
    },
    showTitle: {
      type: 'boolean',
      default: true
    },
    backgroundColor: {
      type: 'string',
      default: ''
    },
    visibility: {
      type: 'object',
      default: {
        desktop: false,
        tablet: false,
        mobile: false
      }
    },
    titleTypography: {
      type: 'object',
      default: {
        fontFamily: '',
        fontSize: '',
        fontWeight: 'normal',
        lineHeight: '',
        letterSpacing: '',
        textTransform: 'none',
        fontStyle: 'normal',
        textDecoration: 'none'
      }
    }
  },
  edit: function (props) {
    const {
      attributes,
      setAttributes
    } = props;
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)();
    const {
      posts,
      isLoading
    } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => {
      const selectedPosts = attributes.selectedPosts;
      const query = {
        include: selectedPosts,
        per_page: -1,
        _embed: true
      };
      return {
        posts: select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_8__.store).getEntityRecords('postType', 'post', query),
        isLoading: select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_8__.store).isResolving('getEntityRecords', ['postType', 'post', query])
      };
    }, [attributes.selectedPosts]);
    const tabs = [{
      name: 'content',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('İçerik', 'kanews'),
      className: 'content-tab'
    }, {
      name: 'design',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Tasarım', 'kanews'),
      className: 'design-tab'
    }, {
      name: 'visibility',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Görünürlük', 'kanews'),
      className: 'visibility-tab'
    }];
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.TabPanel, {
      className: "kanews-tab-panel",
      tabs: tabs
    }, tab => {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, tab.name === 'content' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Başlık Göster', 'kanews'),
        checked: attributes.showTitle,
        onChange: value => setAttributes({
          showTitle: value
        })
      }), attributes.showTitle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.RichText, {
        tagName: "h2",
        value: attributes.title,
        onChange: value => setAttributes({
          title: value
        }),
        placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Başlık...', 'kanews')
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.BaseControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Başlık Etiketi', 'kanews'),
        __nextHasNoMarginBottom: true
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, {
        value: attributes.headingTag,
        options: [{
          label: 'H2',
          value: 'h2'
        }, {
          label: 'H3',
          value: 'h3'
        }, {
          label: 'H4',
          value: 'h4'
        }, {
          label: 'H5',
          value: 'h5'
        }, {
          label: 'H6',
          value: 'h6'
        }, {
          label: 'div',
          value: 'div'
        }],
        onChange: value => setAttributes({
          headingTag: value
        }),
        __nextHasNoMarginBottom: true,
        __next40pxDefaultSize: true
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.BaseControl, {
        __nextHasNoMarginBottom: true
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_PostSearch__WEBPACK_IMPORTED_MODULE_9__["default"], {
        selectedPosts: attributes.selectedPosts,
        multiple: false,
        labelText: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Gösterilecek Yazı', 'kanews'),
        onChange: selectedPosts => {
          console.log('Selected posts:', selectedPosts);
          setAttributes({
            selectedPosts: selectedPosts.map(post => post.id)
          });
        }
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_ToggleSwitch__WEBPACK_IMPORTED_MODULE_10__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Devamını Oku', 'kanews'),
        checked: attributes.showDetailText,
        onChange: value => setAttributes({
          showDetailText: value
        })
      }), attributes.showDetailText && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.BaseControl, {
        __nextHasNoMarginBottom: true
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.TextControl, {
        value: attributes.detailText,
        onChange: value => setAttributes({
          detailText: value
        }),
        __nextHasNoMarginBottom: true,
        __next40pxDefaultSize: true
      }))), tab.name === 'design' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_13__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Yazı Başlığı Tipografisi', 'kanews'),
        value: attributes.titleTypography,
        onChange: value => setAttributes({
          titleTypography: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_12__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('Arkaplan Rengi', 'kanews'),
        value: attributes.backgroundColor,
        onChange: value => setAttributes({
          backgroundColor: value
        })
      })), tab.name === 'visibility' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_VisibilityControl__WEBPACK_IMPORTED_MODULE_11__["default"], {
        value: attributes.visibility,
        onChange: value => setAttributes({
          visibility: value
        })
      })));
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_15___default()), {
      block: "kanews/related-posts",
      attributes: attributes,
      LoadingResponsePlaceholder: () => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_utils_Loading__WEBPACK_IMPORTED_MODULE_14__["default"], {
        text: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__.__)('İlgili yazılar yükleniyor...', 'kanews')
      }),
      httpMethod: "GET"
    }));
  },
  save: function () {
    return null;
  }
});

/***/ }),

/***/ "./src/blocks/related-posts/style.scss":
/*!*********************************************!*\
  !*** ./src/blocks/related-posts/style.scss ***!
  \*********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/blocks/table-of-contents/index.js":
/*!***********************************************!*\
  !*** ./src/blocks/table-of-contents/index.js ***!
  \***********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
/* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _components_Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/Typography */ "./src/components/Typography/index.js");
/* harmony import */ var _components_VisibilityControl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/VisibilityControl */ "./src/components/VisibilityControl/index.js");
/* harmony import */ var _components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/FlatColorPicker */ "./src/components/FlatColorPicker/index.js");
/* harmony import */ var _components_Spacing__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/Spacing */ "./src/components/Spacing/index.js");
/* harmony import */ var _components_Border__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/Border */ "./src/components/Border/index.js");
/* harmony import */ var _utils_Loading__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/Loading */ "./src/utils/Loading/index.js");







// Import custom components






(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)('kanews/table-of-contents', {
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçindekiler', 'kanews'),
  icon: 'list-view',
  category: 'kanews',
  attributes: {
    title: {
      type: 'string',
      default: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçindekiler', 'kanews')
    },
    showTitle: {
      type: 'boolean',
      default: true
    },
    showNumbers: {
      type: 'boolean',
      default: true
    },
    isAccordion: {
      type: 'boolean',
      default: false
    },
    headingLevels: {
      type: 'array',
      default: ['h1', 'h2', 'h3']
    },
    maxDepth: {
      type: 'number',
      default: 3
    },
    // Typography attributes
    titleTypography: {
      type: 'object',
      default: {}
    },
    linkTypography: {
      type: 'object',
      default: {}
    },
    // Style attributes
    titleColor: {
      type: 'string',
      default: ''
    },
    linkColor: {
      type: 'string',
      default: ''
    },
    linkHoverColor: {
      type: 'string',
      default: ''
    },
    backgroundColor: {
      type: 'string',
      default: ''
    },
    // Visibility
    visibility: {
      type: 'object',
      default: {
        desktop: false,
        tablet: false,
        mobile: false
      }
    },
    margin: {
      type: 'object',
      default: {
        desktop: {
          top: '',
          right: '',
          bottom: '',
          left: ''
        },
        tablet: {
          top: '',
          right: '',
          bottom: '',
          left: ''
        },
        mobile: {
          top: '',
          right: '',
          bottom: '',
          left: ''
        }
      }
    },
    padding: {
      type: 'object',
      default: {
        desktop: {
          top: '',
          right: '',
          bottom: '',
          left: ''
        },
        tablet: {
          top: '',
          right: '',
          bottom: '',
          left: ''
        },
        mobile: {
          top: '',
          right: '',
          bottom: '',
          left: ''
        }
      }
    },
    border: {
      type: 'object',
      default: {
        desktop: {
          style: 'none',
          width: {
            top: '',
            right: '',
            bottom: '',
            left: ''
          },
          radius: {
            topLeft: '',
            topRight: '',
            bottomRight: '',
            bottomLeft: ''
          },
          color: ''
        },
        tablet: {
          style: 'none',
          width: {
            top: '',
            right: '',
            bottom: '',
            left: ''
          },
          radius: {
            topLeft: '',
            topRight: '',
            bottomRight: '',
            bottomLeft: ''
          },
          color: ''
        },
        mobile: {
          style: 'none',
          width: {
            top: '',
            right: '',
            bottom: '',
            left: ''
          },
          radius: {
            topLeft: '',
            topRight: '',
            bottomRight: '',
            bottomLeft: ''
          },
          color: ''
        }
      }
    }
  },
  edit: function (props) {
    const {
      attributes,
      setAttributes
    } = props;
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();

    // Tab panel tabs
    const tabs = [{
      name: 'content',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçerik', 'kanews'),
      className: 'content-tab'
    }, {
      name: 'design',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tasarım', 'kanews'),
      className: 'design-tab'
    }, {
      name: 'visibility',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Görünürlük', 'kanews'),
      className: 'visibility-tab'
    }];

    // Toggle heading level
    const toggleHeadingLevel = level => {
      const currentLevels = [...attributes.headingLevels];
      const levelIndex = currentLevels.indexOf(level);
      if (levelIndex === -1) {
        // Add level if not present
        currentLevels.push(level);
      } else {
        // Remove level if present
        currentLevels.splice(levelIndex, 1);
      }
      setAttributes({
        headingLevels: currentLevels
      });
    };
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TabPanel, {
      className: "kanews-tabs",
      tabs: tabs
    }, tab => {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, tab.name === 'content' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçerik Ayarları', 'kanews'),
        initialOpen: true
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TextControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Başlık', 'kanews'),
        value: attributes.title,
        onChange: value => setAttributes({
          title: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Başlık Göster', 'kanews'),
        checked: attributes.showTitle,
        onChange: value => setAttributes({
          showTitle: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Numaraları Göster', 'kanews'),
        checked: attributes.showNumbers,
        onChange: value => setAttributes({
          showNumbers: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Açılır Menü', 'kanews'),
        checked: attributes.isAccordion,
        onChange: value => setAttributes({
          isAccordion: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.RangeControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Maksimum Derinlik', 'kanews'),
        value: attributes.maxDepth,
        onChange: value => setAttributes({
          maxDepth: value
        }),
        min: 1,
        max: 6
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "components-base-control"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "components-base-control__field"
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
        className: "components-base-control__label"
      }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Heading Levels', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: "components-button-group"
      }, ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].map(level => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
        key: level,
        isPrimary: attributes.headingLevels.includes(level),
        onClick: () => toggleHeadingLevel(level),
        className: "components-button-group__button"
      }, level.toUpperCase())))))), tab.name === 'design' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Renk Ayarları', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Arka Plan Rengi', 'kanews'),
        value: attributes.backgroundColor,
        onChange: value => setAttributes({
          backgroundColor: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Başlık Rengi', 'kanews'),
        value: attributes.titleColor,
        onChange: value => setAttributes({
          titleColor: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Link Rengi', 'kanews'),
        value: attributes.linkColor,
        onChange: value => setAttributes({
          linkColor: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Link Hover Rengi', 'kanews'),
        value: attributes.linkHoverColor,
        onChange: value => setAttributes({
          linkHoverColor: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Yazı Tipi Ayarları', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_6__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Başlık Yazı Tipi', 'kanews'),
        value: attributes.titleTypography,
        onChange: value => setAttributes({
          titleTypography: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Typography__WEBPACK_IMPORTED_MODULE_6__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Link Yazı Tipi', 'kanews'),
        value: attributes.linkTypography,
        onChange: value => setAttributes({
          linkTypography: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Boşluk Ayarları', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_9__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Margin', 'kanews'),
        value: attributes.margin,
        onChange: value => setAttributes({
          margin: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Spacing__WEBPACK_IMPORTED_MODULE_9__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Padding', 'kanews'),
        value: attributes.padding,
        onChange: value => setAttributes({
          padding: value
        })
      })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık Ayarları', 'kanews'),
        initialOpen: false
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_Border__WEBPACK_IMPORTED_MODULE_10__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kanews'),
        value: attributes.border,
        onChange: value => setAttributes({
          border: value
        })
      }))), tab.name === 'visibility' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
        title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Görünürlük Ayarları', 'kanews'),
        initialOpen: true
      }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_VisibilityControl__WEBPACK_IMPORTED_MODULE_7__["default"], {
        value: attributes.visibility,
        onChange: value => setAttributes({
          visibility: value
        })
      })));
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_5___default()), {
      block: "kanews/table-of-contents",
      attributes: attributes,
      LoadingResponsePlaceholder: () => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_utils_Loading__WEBPACK_IMPORTED_MODULE_11__["default"], null)
    }));
  },
  save: function () {
    return null; // Dynamic block, rendered on PHP side
  }
});

/***/ }),

/***/ "./src/blocks/timeline-item/index.js":
/*!*******************************************!*\
  !*** ./src/blocks/timeline-item/index.js ***!
  \*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _utils_typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/typography */ "./src/utils/typography.js");






(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)('kanews/timeline-item', {
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Zaman Çizelgesi Öğesi', 'kanews'),
  category: 'kanews',
  parent: ['kanews/timeline'],
  attributes: {
    time: {
      type: 'string',
      default: '10:00'
    },
    timeTypography: {
      type: 'object',
      default: {
        fontFamily: '',
        fontSize: '',
        fontWeight: 'normal',
        lineHeight: '',
        letterSpacing: '',
        textTransform: 'none',
        fontStyle: 'normal',
        textDecoration: 'none'
      }
    },
    contentTypography: {
      type: 'object',
      default: {
        fontFamily: '',
        fontSize: '',
        fontWeight: 'normal',
        lineHeight: '',
        letterSpacing: '',
        textTransform: 'none',
        fontStyle: 'normal',
        textDecoration: 'none'
      }
    }
  },
  edit: ({
    attributes,
    setAttributes
  }) => {
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();
    const {
      time,
      timeTypography,
      contentTypography
    } = attributes;

    // Apply typography styles
    const timeStyles = (0,_utils_typography__WEBPACK_IMPORTED_MODULE_5__.getTypographyStyles)(timeTypography);
    const contentStyles = (0,_utils_typography__WEBPACK_IMPORTED_MODULE_5__.getTypographyStyles)(contentTypography);
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "kanews-timeline-news-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "kanews-timeline-news-date"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
      width: "18",
      height: "18",
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      fill: "currentColor",
      d: "M15.09814,12.63379,13,11.42285V7a1,1,0,0,0-2,0v5a.99985.99985,0,0,0,.5.86621l2.59814,1.5a1.00016,1.00016,0,1,0,1-1.73242ZM12,2A10,10,0,1,0,22,12,10.01114,10.01114,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.00917,8.00917,0,0,1,12,20Z"
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
      tagName: "span",
      value: time,
      onChange: value => setAttributes({
        time: value
      }),
      placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Saat...', 'kanews'),
      className: "timeline-time-editor",
      style: timeStyles
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "kanews-timeline-news-content",
      style: contentStyles
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
      allowedBlocks: ['core/paragraph', 'core/heading', 'core/list', 'core/image', 'core/quote'],
      template: [['core/paragraph', {
        placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('İçerik ekleyin...', 'kanews')
      }]],
      renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.ButtonBlockAppender
    }))));
  },
  save: ({
    attributes
  }) => {
    const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps.save();
    const {
      time,
      timeTypography,
      contentTypography
    } = attributes;

    // Apply typography styles for save
    const timeStyles = (0,_utils_typography__WEBPACK_IMPORTED_MODULE_5__.getTypographyStyles)(timeTypography);
    const contentStyles = (0,_utils_typography__WEBPACK_IMPORTED_MODULE_5__.getTypographyStyles)(contentTypography);
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "kanews-timeline-news-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "kanews-timeline-news-date"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
      width: "18",
      height: "18",
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      fill: "currentColor",
      d: "M15.09814,12.63379,13,11.42285V7a1,1,0,0,0-2,0v5a.99985.99985,0,0,0,.5.86621l2.59814,1.5a1.00016,1.00016,0,1,0,1-1.73242ZM12,2A10,10,0,1,0,22,12,10.01114,10.01114,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.00917,8.00917,0,0,1,12,20Z"
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      style: timeStyles
    }, time)), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "kanews-timeline-news-content",
      style: contentStyles
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.Content, null))));
  }
});

/***/ }),

/***/ "./src/blocks/timeline/editor.scss":
/*!*****************************************!*\
  !*** ./src/blocks/timeline/editor.scss ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/blocks/timeline/index.js":
/*!**************************************!*\
  !*** ./src/blocks/timeline/index.js ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__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_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style.scss */ "./src/blocks/timeline/style.scss");
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editor.scss */ "./src/blocks/timeline/editor.scss");
/* harmony import */ var _components_VisibilityControl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/VisibilityControl */ "./src/components/VisibilityControl/index.js");
/* harmony import */ var _components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/FlatColorPicker */ "./src/components/FlatColorPicker/index.js");









(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)('kanews/timeline', {
  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Zaman Çizelgesi', 'kanews'),
  category: 'kanews',
  icon: 'clock',
  supports: {
    html: false,
    align: ['wide', 'full', 'center', 'left', 'right', 'justify', 'full']
  },
  attributes: {
    showShare: {
      type: 'boolean',
      default: true
    },
    primaryColor: {
      type: 'string',
      default: ''
    },
    borderColor: {
      type: 'string',
      default: ''
    },
    visibility: {
      type: 'object',
      default: {
        desktop: false,
        tablet: false,
        mobile: false
      }
    }
  },
  edit: ({
    attributes,
    setAttributes
  }) => {
    const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)();
    const {
      primaryColor,
      borderColor,
      visibility
    } = attributes;
    const tabs = [{
      name: 'content',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('İçerik', 'kanews'),
      className: 'content-tab'
    }, {
      name: 'design',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Tasarım', 'kanews'),
      className: 'design-tab'
    }, {
      name: 'visibility',
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Görünürlük', 'kanews'),
      className: 'visibility-tab'
    }];
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.TabPanel, {
      className: "kanews-tab-panel",
      tabs: tabs
    }, tab => {
      return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, tab.name === 'content' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Paylaşım Butonu', 'kanews'),
        checked: attributes.showShare,
        onChange: value => setAttributes({
          showShare: value
        })
      })), tab.name === 'design' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Birincil Renk', 'kanews'),
        value: attributes.primaryColor,
        onChange: value => setAttributes({
          primaryColor: value
        })
      }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_FlatColorPicker__WEBPACK_IMPORTED_MODULE_8__["default"], {
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Kenarlık Rengi', 'kanews'),
        value: attributes.borderColor,
        onChange: value => setAttributes({
          borderColor: value
        })
      })), tab.name === 'visibility' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_VisibilityControl__WEBPACK_IMPORTED_MODULE_7__["default"], {
        value: attributes.visibility,
        onChange: value => setAttributes({
          visibility: value
        })
      })));
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: `kanews-timeline-news ${visibility.desktop ? 'hidden-desktop' : ''} ${visibility.tablet ? 'hidden-tablet' : ''} ${visibility.mobile ? 'hidden-mobile' : ''}`,
      style: {
        '--timeline-color': primaryColor || undefined,
        '--kan-border-color2': borderColor || undefined
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
      allowedBlocks: ['kanews/timeline-item'],
      template: [['kanews/timeline-item']],
      renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.ButtonBlockAppender
    }))));
  },
  save: ({
    attributes
  }) => {
    const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps.save();
    const {
      showShare,
      primaryColor,
      visibility,
      borderColor
    } = attributes;
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      ...blockProps
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: `kanews-timeline-news ${visibility.desktop ? 'hidden-desktop' : ''} ${visibility.tablet ? 'hidden-tablet' : ''} ${visibility.mobile ? 'hidden-mobile' : ''}`,
      style: {
        '--timeline-color': primaryColor || undefined,
        '--kan-border-color2': borderColor || undefined
      }
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks.Content, null)));
  }
});

/***/ }),

/***/ "./src/blocks/timeline/style.scss":
/*!****************************************!*\
  !*** ./src/blocks/timeline/style.scss ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/components/Border/index.js":
/*!****************************************!*\
  !*** ./src/components/Border/index.js ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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 _FlatColorPicker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../FlatColorPicker */ "./src/components/FlatColorPicker/index.js");
/* harmony import */ var _utils_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/icons */ "./src/utils/icons.js");






// import './style.scss';

const DeviceIcon = ({
  type
}) => {
  switch (type) {
    case 'desktop':
      return _utils_icons__WEBPACK_IMPORTED_MODULE_5__.Icons.desktop;
    case 'tablet':
      return _utils_icons__WEBPACK_IMPORTED_MODULE_5__.Icons.tablet;
    case 'mobile':
      return _utils_icons__WEBPACK_IMPORTED_MODULE_5__.Icons.mobile;
    default:
      return null;
  }
};
const Border = ({
  value = {},
  onChange,
  label = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık', 'kan')
}) => {
  const [activeDevice, setActiveDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)('desktop');
  const [isLinked, setIsLinked] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(true);
  const dropdownRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)();
  const devices = [{
    name: 'desktop',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Masaüstü', 'kan')
  }, {
    name: 'tablet',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tablet', 'kan')
  }, {
    name: 'mobile',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Mobil', 'kan')
  }];
  const edges = [{
    name: 'top',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Üst', 'kan')
  }, {
    name: 'right',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sağ', 'kan')
  }, {
    name: 'bottom',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Alt', 'kan')
  }, {
    name: 'left',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sol', 'kan')
  }];
  const borderStyles = [{
    value: 'none',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Yok', 'kan')
  }, {
    value: 'solid',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Düz', 'kan')
  }, {
    value: 'dashed',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kesikli', 'kan')
  }, {
    value: 'dotted',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Noktalı', 'kan')
  }, {
    value: 'double',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Çift', 'kan')
  }, {
    value: 'groove',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Oluk', 'kan')
  }, {
    value: 'ridge',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sırt', 'kan')
  }, {
    value: 'inset',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İçe', 'kan')
  }, {
    value: 'outset',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dışa', 'kan')
  }];
  const updateValue = (property, newValue) => {
    if (isLinked) {
      // Create a new object with all properties updated
      const updatedValue = {
        ...value,
        [activeDevice]: {
          ...(value[activeDevice] || {}),
          [property]: newValue
        }
      };

      // If it's a nested property like width or radius, update all edges
      if (property === 'width' || property === 'radius') {
        const numValue = parseInt(newValue) || 0;
        if (property === 'width') {
          updatedValue[activeDevice].width = {
            top: numValue,
            right: numValue,
            bottom: numValue,
            left: numValue
          };
        } else if (property === 'radius') {
          updatedValue[activeDevice].radius = {
            topLeft: numValue,
            topRight: numValue,
            bottomRight: numValue,
            bottomLeft: numValue
          };
        }
      }
      onChange(updatedValue);
    } else {
      onChange({
        ...value,
        [activeDevice]: {
          ...(value[activeDevice] || {}),
          [property]: newValue
        }
      });
    }
  };
  const updateEdgeValue = (edge, property, newValue) => {
    const numValue = parseInt(newValue) || 0;
    if (isLinked) {
      // If linked, update all edges with the same value
      if (property === 'width') {
        updateValue('width', numValue);
      } else if (property === 'radius') {
        updateValue('radius', numValue);
      }
    } else {
      // If not linked, only update the specific edge
      onChange({
        ...value,
        [activeDevice]: {
          ...(value[activeDevice] || {}),
          [property]: {
            ...(value[activeDevice]?.[property] || {}),
            [edge]: numValue
          }
        }
      });
    }
  };
  const getCurrentValue = (property, edge = null) => {
    if (!value[activeDevice]) return '';
    if (edge) {
      return value[activeDevice][property]?.[edge] || '';
    }
    return value[activeDevice][property] || '';
  };
  const resetValue = () => {
    onChange({});
  };
  const handleDeviceChange = device => {
    setActiveDevice(device);
    if (dropdownRef.current) {
      dropdownRef.current.toggle();
    }
  };
  const currentColor = getCurrentValue('color') || '';
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.BaseControl, {
    className: "kan-control-item kan-border-control"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-label"
  }, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Dropdown, {
    ref: dropdownRef,
    className: "kan-device-dropdown",
    contentClassName: "kan-device-dropdown-content",
    position: "bottom right",
    renderToggle: ({
      isOpen,
      onToggle
    }) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
      onClick: onToggle,
      "aria-expanded": isOpen,
      className: "kan-device-button"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(DeviceIcon, {
      type: activeDevice
    })),
    renderContent: () => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.MenuGroup, null, devices.map(device => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.MenuItem, {
      key: device.name,
      onClick: () => handleDeviceChange(device.name),
      isSelected: activeDevice === device.name
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(DeviceIcon, {
      type: device.name
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, device.label))))
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    isSmall: true,
    isSecondary: true,
    onClick: resetValue,
    className: "kan-reset-button",
    icon: "image-rotate"
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-inputs"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-section"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Köşe Yuvarlaklığı', 'kan')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-box"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-field"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    type: "number",
    className: "kan-control-input kan-control-top-left",
    value: getCurrentValue('radius', 'topLeft'),
    onChange: value => updateEdgeValue('topLeft', 'radius', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sol Üst', 'kan'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-field"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    type: "number",
    className: "kan-control-input kan-control-top-right",
    value: getCurrentValue('radius', 'topRight'),
    onChange: value => updateEdgeValue('topRight', 'radius', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sağ Üst', 'kan'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-field"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    type: "number",
    className: "kan-control-input kan-control-bottom-right",
    value: getCurrentValue('radius', 'bottomRight'),
    onChange: value => updateEdgeValue('bottomRight', 'radius', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sağ Alt', 'kan'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-field"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    type: "number",
    className: "kan-control-input kan-control-bottom-left",
    value: getCurrentValue('radius', 'bottomLeft'),
    onChange: value => updateEdgeValue('bottomLeft', 'radius', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sol Alt', 'kan'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "kan-control-link",
    isPrimary: isLinked,
    onClick: () => setIsLinked(!isLinked),
    icon: isLinked ? 'admin-links' : 'editor-unlink'
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-section"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık Stili', 'kan')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
    value: getCurrentValue('style'),
    options: borderStyles,
    onChange: value => updateValue('style', value)
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-section"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık Kalınlığı', 'kan')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-box"
  }, edges.map(edge => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    key: edge.name,
    className: "kan-control-field"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    type: "number",
    className: `kan-control-input kan-control-${edge.name}`,
    value: getCurrentValue('width', edge.name),
    onChange: value => updateEdgeValue(edge.name, 'width', value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-label"
  }, edge.label))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "kan-control-link",
    isPrimary: isLinked,
    onClick: () => setIsLinked(!isLinked),
    icon: isLinked ? 'admin-links' : 'editor-unlink'
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-section"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Kenarlık Rengi', 'kan')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FlatColorPicker__WEBPACK_IMPORTED_MODULE_4__["default"], {
    value: currentColor,
    onChange: value => updateValue('color', value)
  }))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Border);

/***/ }),

/***/ "./src/components/FlatColorPicker/index.js":
/*!*************************************************!*\
  !*** ./src/components/FlatColorPicker/index.js ***!
  \*************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__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__);





// import './style.scss';

const FlatColorPicker = ({
  color = '',
  value = '',
  onChange,
  label
}) => {
  // Use the value prop if provided, otherwise use the color prop
  const initialColor = value !== undefined ? value : color;

  // Use state to track the current color value
  const [currentColor, setCurrentColor] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(initialColor);
  const [isOpen, setIsOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false);
  const popupRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);
  const inputRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);

  // Update internal state when props change
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {
    // Use the value prop if provided, otherwise use the color prop
    const newColor = value !== undefined ? value : color;
    setCurrentColor(newColor);
  }, [color, value]);

  // Input değeri değiştiğinde
  const handleInputChange = e => {
    const newValue = e.target.value;

    // Geçerli bir renk kodu ise
    if (/^#[0-9A-Fa-f]{6}$/.test(newValue)) {
      setCurrentColor(newValue);
      onChange(newValue);
    }
  };

  // Renk seçici açıldığında
  const openColorPicker = () => {
    setIsOpen(true);
  };

  // Renk seçildiğinde
  const handleColorChange = newColor => {
    const hexColor = newColor.hex;
    setCurrentColor(hexColor);
    onChange(hexColor);
  };

  // Rengi sıfırla
  const resetColor = () => {
    setCurrentColor('');
    onChange('');
  };

  // Dışarı tıklandığında popup'ı kapat
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {
    const handleClickOutside = event => {
      if (popupRef.current && !popupRef.current.contains(event.target)) {
        setIsOpen(false);
      }
    };
    document.addEventListener('mousedown', handleClickOutside);
    return () => {
      document.removeEventListener('mousedown', handleClickOutside);
    };
  }, []);
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "flat-color-picker kanews-control-item"
  }, label && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "flat-color-picker-label"
  }, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "color-preview",
    style: {
      backgroundColor: currentColor || 'transparent'
    }
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "color-input"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    ref: inputRef,
    type: "text",
    value: currentColor,
    onChange: handleInputChange
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "color-picker-actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
    className: "color-picker-button",
    onClick: openColorPicker
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Renk Seç', 'kanews')), currentColor && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
    className: "color-reset-button components-button is-small is-secondary",
    onClick: resetColor,
    isSmall: true
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sıfırla', 'kanews'))), isOpen && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "flat-color-picker-popup",
    ref: popupRef
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ColorPicker, {
    color: currentColor,
    onChangeComplete: handleColorChange
  })));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FlatColorPicker);

/***/ }),

/***/ "./src/components/IconPicker/index.js":
/*!********************************************!*\
  !*** ./src/components/IconPicker/index.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__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 _utils_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/icons */ "./src/utils/icons.js");





// import './style.scss';

const IconPicker = ({
  value = '',
  onChange,
  label = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İkon Seç', 'kanews'),
  placeholder = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İkon ara...', 'kanews')
}) => {
  const [isOpen, setIsOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false);
  const [searchTerm, setSearchTerm] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)('');
  const [filteredIcons, setFilteredIcons] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(_utils_icons__WEBPACK_IMPORTED_MODULE_4__.kanewsIcons);

  // İkon arama fonksiyonu
  const handleSearch = term => {
    setSearchTerm(term);
    if (term) {
      const filtered = _utils_icons__WEBPACK_IMPORTED_MODULE_4__.kanewsIcons.filter(icon => icon.label.toLowerCase().includes(term.toLowerCase()) || icon.value.toLowerCase().includes(term.toLowerCase()));
      setFilteredIcons(filtered);
    } else {
      setFilteredIcons(_utils_icons__WEBPACK_IMPORTED_MODULE_4__.kanewsIcons);
    }
  };

  // İkon seçme fonksiyonu
  const handleSelect = iconValue => {
    onChange(iconValue);
    setIsOpen(false);
    setSearchTerm('');
    setFilteredIcons(_utils_icons__WEBPACK_IMPORTED_MODULE_4__.kanewsIcons);
  };

  // Seçili ikonun etiketini bul
  const selectedIcon = _utils_icons__WEBPACK_IMPORTED_MODULE_4__.kanewsIcons.find(icon => icon.value === value);
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kanews-icon-picker"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kanews-icon-picker__button"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
    className: "kanews-icon-picker__button-content",
    onClick: () => setIsOpen(!isOpen),
    "aria-expanded": isOpen
  }, value ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: value
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, selectedIcon ? selectedIcon.label : value)) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, label))), isOpen && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "kanews-icon-picker__popover",
    position: "bottom left",
    onClose: () => setIsOpen(false)
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kanews-icon-picker__search"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TextControl, {
    value: searchTerm,
    onChange: handleSearch,
    placeholder: placeholder
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kanews-icon-picker__list"
  }, filteredIcons.map(icon => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
    key: icon.value,
    className: `kanews-icon-picker__item ${value === icon.value ? 'is-selected' : ''}`,
    onClick: () => handleSelect(icon.value)
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("i", {
    className: icon.value
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, icon.label))))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IconPicker);

/***/ }),

/***/ "./src/components/PostSearch/index.js":
/*!********************************************!*\
  !*** ./src/components/PostSearch/index.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_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_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_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_api_fetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4__);





// import './style.scss';

const PostSearch = ({
  selectedPosts = [],
  onChange,
  multiple = true,
  labelText = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Gösterilecek Yazılar', 'kanews')
}) => {
  const [searchTerm, setSearchTerm] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
  const [suggestions, setSuggestions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
  const [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [tokens, setTokens] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
  const [mediaUrls, setMediaUrls] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});
  const [postDetails, setPostDetails] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({});

  // Seçili gönderilerin detaylarını getir
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    const fetchSelectedPosts = async () => {
      if (!selectedPosts || selectedPosts.length === 0) {
        setTokens([]);
        setPostDetails({});
        return;
      }
      try {
        const response = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4___default()({
          path: `/wp/v2/posts?include=${selectedPosts.join(',')}&_fields=id,title,date,featured_media`
        });

        // Post detaylarını sakla
        const newPostDetails = {};
        response.forEach(post => {
          newPostDetails[post.id] = {
            id: post.id,
            title: post.title.rendered || '',
            date: post.date || '',
            featured_media: post.featured_media
          };
        });
        setPostDetails(newPostDetails);

        // Token'ları oluştur
        const initialTokens = response.map(post => ({
          id: post.id,
          value: post.id,
          title: post.title.rendered || '',
          date: post.date || '',
          featured_media: post.featured_media
        }));
        setTokens(initialTokens);
      } catch (error) {
        console.error('Error fetching selected posts:', error);
      }
    };
    fetchSelectedPosts();
  }, [selectedPosts]);

  // Medya URL'lerini getir
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    const fetchMediaUrls = async () => {
      const mediaIds = [...new Set([...tokens.map(token => token.featured_media), ...suggestions.map(suggestion => suggestion.featured_media)].filter(Boolean))];
      if (mediaIds.length === 0) return;
      try {
        const mediaItems = await Promise.all(mediaIds.map(id => _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4___default()({
          path: `/wp/v2/media/${id}`
        }).catch(() => null)));
        const newMediaUrls = {};
        mediaItems.forEach(item => {
          if (item && item.id) {
            newMediaUrls[item.id] = item.source_url;
          }
        });
        setMediaUrls(prev => ({
          ...prev,
          ...newMediaUrls
        }));
      } catch (error) {
        console.error('Error fetching media:', error);
      }
    };
    fetchMediaUrls();
  }, [tokens, suggestions]);

  // Arama önerilerini getir
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
    if (!searchTerm) {
      setSuggestions([]);
      return;
    }
    const fetchSuggestions = async () => {
      setIsLoading(true);
      try {
        const response = await _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4___default()({
          path: `/wp/v2/posts?search=${encodeURIComponent(searchTerm)}&per_page=10&_fields=id,title,date,featured_media`
        });
        const newSuggestions = response.map(post => ({
          id: post.id,
          value: post.id,
          title: post.title.rendered || '',
          date: post.date || '',
          featured_media: post.featured_media
        }));
        setSuggestions(newSuggestions);
      } catch (error) {
        console.error('Error fetching suggestions:', error);
        setSuggestions([]);
      }
      setIsLoading(false);
    };
    const debounceTimer = setTimeout(fetchSuggestions, 300);
    return () => clearTimeout(debounceTimer);
  }, [searchTerm]);
  const handleChange = newTokens => {
    // Token'ları doğru formata dönüştür
    const formattedTokens = newTokens.map(token => {
      if (typeof token === 'string') {
        // Eğer token bir string ise, mevcut token'lardan veya önerilerden bul
        const existingToken = tokens.find(t => t.title === token) || suggestions.find(s => s.title === token);
        return existingToken || {
          id: token,
          value: token,
          title: token
        };
      }
      return token;
    });

    // Multiple false ise sadece son seçilen token'ı al
    const finalTokens = multiple ? formattedTokens : formattedTokens.slice(-1);
    setTokens(finalTokens);

    // Seçili gönderileri parent bileşene bildir
    const selectedPostsData = finalTokens.map(token => ({
      id: token.id || token.value,
      title: token.title,
      date: token.date,
      featured_media: token.featured_media
    }));
    onChange(selectedPostsData);
  };
  const renderSuggestion = suggestion => {
    if (!suggestion || typeof suggestion !== 'object') return null;
    const mediaUrl = suggestion.featured_media ? mediaUrls[suggestion.featured_media] : null;
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "post-search-suggestion"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "post-search-suggestion-thumbnail"
    }, mediaUrl ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      src: mediaUrl,
      alt: suggestion.title || ''
    }) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "no-thumbnail"
    })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "post-search-suggestion-info"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "post-search-suggestion-title"
    }, suggestion.title || ''), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "post-search-suggestion-date"
    }, suggestion.date ? new Date(suggestion.date).toLocaleDateString() : '')));
  };

  // Token'ları string dizisine dönüştür (FormTokenField için)
  const tokenValues = tokens.map(token => token.title);
  const suggestionValues = suggestions.map(suggestion => suggestion.title);
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "post-search kanews-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.FormTokenField, {
    label: labelText,
    value: tokenValues,
    suggestions: suggestionValues,
    onChange: handleChange,
    onInputChange: setSearchTerm,
    tokenizeOnBlur: true,
    __experimentalExpandOnFocus: true,
    __experimentalAutoSelectFirstMatch: false,
    placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Yazı başlığı yazın...', 'kanews'),
    renderSuggestion: renderSuggestion,
    __nextHasNoMarginBottom: true,
    __next40pxDefaultSize: true,
    multiple: multiple
  }), isLoading && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Spinner, null));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostSearch);

/***/ }),

/***/ "./src/components/ResponsiveControl/index.js":
/*!***************************************************!*\
  !*** ./src/components/ResponsiveControl/index.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_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_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style.scss */ "./src/components/ResponsiveControl/style.scss");
/* harmony import */ var _utils_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/icons */ "./src/utils/icons.js");






const DeviceIcon = ({
  type
}) => {
  switch (type) {
    case 'desktop':
      return _utils_icons__WEBPACK_IMPORTED_MODULE_5__.Icons.desktop;
    case 'tablet':
      return _utils_icons__WEBPACK_IMPORTED_MODULE_5__.Icons.tablet;
    case 'mobile':
      return _utils_icons__WEBPACK_IMPORTED_MODULE_5__.Icons.mobile;
    default:
      return null;
  }
};
const ResponsiveNumber = ({
  value = {},
  onChange,
  label = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Sütun Sayısı', 'kan'),
  min = 1,
  max = 6,
  defaultValues = {
    desktop: 3,
    tablet: 2,
    mobile: 1
  }
}) => {
  const [activeDevice, setActiveDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('desktop');
  const dropdownRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)();
  const devices = [{
    name: 'desktop',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Masaüstü', 'kan')
  }, {
    name: 'tablet',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Tablet', 'kan')
  }, {
    name: 'mobile',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Mobil', 'kan')
  }];
  const updateValue = newValue => {
    onChange({
      ...value,
      [activeDevice]: newValue
    });
  };
  const getCurrentValue = () => {
    if (!value[activeDevice]) return defaultValues[activeDevice];
    return value[activeDevice];
  };
  const resetValue = () => {
    onChange(defaultValues);
  };
  const handleDeviceChange = device => {
    setActiveDevice(device);
    if (dropdownRef.current) {
      dropdownRef.current.toggle();
    }
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.BaseControl, {
    className: "kan-control-item kan-responsive-number"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-label"
  }, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Dropdown, {
    ref: dropdownRef,
    className: "kan-device-dropdown",
    contentClassName: "kan-device-dropdown-content",
    position: "bottom right",
    renderToggle: ({
      isOpen,
      onToggle
    }) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
      onClick: onToggle,
      "aria-expanded": isOpen,
      className: "kan-device-button"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(DeviceIcon, {
      type: activeDevice
    })),
    renderContent: () => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.MenuGroup, null, devices.map(device => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.MenuItem, {
      key: device.name,
      onClick: () => handleDeviceChange(device.name),
      isSelected: activeDevice === device.name
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(DeviceIcon, {
      type: device.name
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, device.label))))
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    isSmall: true,
    isSecondary: true,
    onClick: resetValue,
    className: "kan-reset-button",
    icon: "image-rotate"
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-inputs"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-box"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
    value: getCurrentValue(),
    onChange: updateValue,
    min: min,
    max: max,
    allowReset: true,
    resetFallbackValue: defaultValues[activeDevice]
  }))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResponsiveNumber);

/***/ }),

/***/ "./src/components/ResponsiveControl/style.scss":
/*!*****************************************************!*\
  !*** ./src/components/ResponsiveControl/style.scss ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/components/Spacing/index.js":
/*!*****************************************!*\
  !*** ./src/components/Spacing/index.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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 _utils_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/icons */ "./src/utils/icons.js");





// import './style.scss';

const DeviceIcon = ({
  type
}) => {
  switch (type) {
    case 'desktop':
      return _utils_icons__WEBPACK_IMPORTED_MODULE_4__.Icons.desktop;
    case 'tablet':
      return _utils_icons__WEBPACK_IMPORTED_MODULE_4__.Icons.tablet;
    case 'mobile':
      return _utils_icons__WEBPACK_IMPORTED_MODULE_4__.Icons.mobile;
    default:
      return null;
  }
};
const Spacing = ({
  value = {},
  onChange,
  label = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Boşluk', 'kan')
}) => {
  const [activeDevice, setActiveDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)('desktop');
  const [isLinked, setIsLinked] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(true);
  const dropdownRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useRef)();
  const devices = [{
    name: 'desktop',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Masaüstü', 'kan')
  }, {
    name: 'tablet',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tablet', 'kan')
  }, {
    name: 'mobile',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Mobil', 'kan')
  }];
  const edges = [{
    name: 'top',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Üst', 'kan')
  }, {
    name: 'right',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sağ', 'kan')
  }, {
    name: 'bottom',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Alt', 'kan')
  }, {
    name: 'left',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sol', 'kan')
  }];
  const updateValue = (edge, newValue) => {
    const numValue = parseInt(newValue) || 0;
    if (isLinked) {
      onChange({
        ...value,
        [activeDevice]: {
          ...(value[activeDevice] || {}),
          top: numValue,
          right: numValue,
          bottom: numValue,
          left: numValue
        }
      });
    } else {
      onChange({
        ...value,
        [activeDevice]: {
          ...(value[activeDevice] || {}),
          [edge]: numValue
        }
      });
    }
  };
  const getCurrentValue = edge => {
    if (!value[activeDevice]) return '';
    return value[activeDevice][edge] || '';
  };
  const resetValue = () => {
    onChange({});
  };
  const handleDeviceChange = device => {
    setActiveDevice(device);
    if (dropdownRef.current) {
      dropdownRef.current.toggle();
    }
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.BaseControl, {
    className: "kan-control-item kan-spacing-control"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-label"
  }, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-actions"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Dropdown, {
    ref: dropdownRef,
    className: "kan-device-dropdown",
    contentClassName: "kan-device-dropdown-content",
    position: "bottom right",
    renderToggle: ({
      isOpen,
      onToggle
    }) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
      onClick: onToggle,
      "aria-expanded": isOpen,
      className: "kan-device-button"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(DeviceIcon, {
      type: activeDevice
    })),
    renderContent: () => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.MenuGroup, null, devices.map(device => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.MenuItem, {
      key: device.name,
      onClick: () => handleDeviceChange(device.name),
      isSelected: activeDevice === device.name
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(DeviceIcon, {
      type: device.name
    }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, device.label))))
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    isSmall: true,
    isSecondary: true,
    onClick: resetValue,
    className: "kan-reset-button",
    icon: "image-rotate"
  }))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-inputs"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-box"
  }, edges.map(edge => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    key: edge.name,
    className: "kan-control-field"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    type: "number",
    className: `kan-control-input kan-control-${edge.name}`,
    value: getCurrentValue(edge.name),
    onChange: value => updateValue(edge.name, value)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-label"
  }, edge.label))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "kan-control-link",
    isPrimary: isLinked,
    onClick: () => setIsLinked(!isLinked),
    icon: isLinked ? 'admin-links' : 'editor-unlink'
  }))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Spacing);

/***/ }),

/***/ "./src/components/ToggleSwitch/index.js":
/*!**********************************************!*\
  !*** ./src/components/ToggleSwitch/index.js ***!
  \**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);



// import './style.scss';

const ToggleSwitch = ({
  label,
  checked,
  onChange
}) => {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kanews-toggle-control kanews-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
    label: label,
    checked: checked,
    onChange: onChange,
    __nextHasNoMarginBottom: true,
    __next40pxDefaultSize: true
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToggleSwitch);

/***/ }),

/***/ "./src/components/Typography/index.js":
/*!********************************************!*\
  !*** ./src/components/Typography/index.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _FlatColorPicker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../FlatColorPicker */ "./src/components/FlatColorPicker/index.js");




const Typography = ({
  value = {},
  onChange,
  label = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tipografi', 'kanews'),
  showFontFamily = false,
  showFontSize = true,
  showFontWeight = true,
  showLineHeight = true,
  showLetterSpacing = true,
  showTextTransform = true,
  showFontStyle = true,
  showTextDecoration = true,
  showTextAlign = true,
  showColor = true,
  showReset = true
}) => {
  const {
    fontFamily = '',
    fontSize = '',
    fontWeight = 'normal',
    lineHeight = '',
    letterSpacing = '',
    textTransform = 'none',
    fontStyle = 'normal',
    textDecoration = 'none',
    textAlign = 'left',
    color = ''
  } = value;
  const handleChange = (property, newValue) => {
    onChange({
      ...value,
      [property]: newValue
    });
  };
  const handleReset = () => {
    onChange({
      fontFamily: '',
      fontSize: '',
      fontWeight: 'normal',
      lineHeight: '',
      letterSpacing: '',
      textTransform: 'none',
      fontStyle: 'normal',
      textDecoration: 'none',
      textAlign: 'left',
      color: ''
    });
  };
  const tabs = [{
    name: 'basic',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Temel', 'kanews'),
    className: 'tab-basic'
  }, {
    name: 'advanced',
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Gelişmiş', 'kanews'),
    className: 'tab-advanced'
  }];
  const renderBasicControls = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, showFontFamily && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Yazı Tipi', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
    value: fontFamily,
    options: [{
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Varsayılan', 'kanews'),
      value: ''
    }, {
      label: 'Arial',
      value: 'Arial, sans-serif'
    }, {
      label: 'Helvetica',
      value: 'Helvetica, Arial, sans-serif'
    }, {
      label: 'Georgia',
      value: 'Georgia, serif'
    }, {
      label: 'Times New Roman',
      value: 'Times New Roman, serif'
    }, {
      label: 'Verdana',
      value: 'Verdana, sans-serif'
    }],
    onChange: newValue => handleChange('fontFamily', newValue)
  })), showFontSize && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Yazı Boyutu', 'kanews'), " ", (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-unit"
  }, "(px)")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
    value: fontSize ? parseInt(fontSize) : '',
    onChange: newValue => handleChange('fontSize', newValue ? `${newValue}px` : ''),
    min: 8,
    max: 100,
    step: 1,
    withInputField: true
  })), showFontWeight && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Yazı Kalınlığı', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
    value: fontWeight,
    options: [{
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Varsayılan', 'kanews'),
      value: ''
    }, {
      label: '500',
      value: '500'
    }, {
      label: '600',
      value: '600'
    }, {
      label: '700',
      value: '700'
    }],
    onChange: newValue => handleChange('fontWeight', newValue)
  })), showColor && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Metin Rengi', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FlatColorPicker__WEBPACK_IMPORTED_MODULE_3__["default"], {
    value: color,
    onChange: newValue => handleChange('color', newValue)
  })), showTextAlign && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Metin Hizalama', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ButtonGroup, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    isSmall: true,
    isPrimary: textAlign === 'left',
    onClick: () => handleChange('textAlign', 'left'),
    icon: "editor-alignleft"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    isSmall: true,
    isPrimary: textAlign === 'center',
    onClick: () => handleChange('textAlign', 'center'),
    icon: "editor-aligncenter"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    isSmall: true,
    isPrimary: textAlign === 'right',
    onClick: () => handleChange('textAlign', 'right'),
    icon: "editor-alignright"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    isSmall: true,
    isPrimary: textAlign === 'justify',
    onClick: () => handleChange('textAlign', 'justify'),
    icon: "editor-justify"
  }))));
  const renderAdvancedControls = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, showLineHeight && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Satır Yüksekliği', 'kanews'), " ", (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-unit"
  }, "(em)")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
    value: lineHeight ? parseFloat(lineHeight) : 1.5,
    onChange: newValue => handleChange('lineHeight', newValue),
    min: 1,
    max: 3,
    step: 0.1,
    withInputField: true
  })), showLetterSpacing && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Harf Aralığı', 'kanews'), " ", (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "kan-control-unit"
  }, "(px)")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
    value: letterSpacing ? parseInt(letterSpacing) : 0,
    onChange: newValue => handleChange('letterSpacing', newValue ? `${newValue}px` : ''),
    min: -5,
    max: 20,
    step: 1,
    withInputField: true
  })), showTextTransform && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Metin Dönüşümü', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
    value: textTransform,
    options: [{
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Normal', 'kanews'),
      value: 'none'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Büyük Harf', 'kanews'),
      value: 'uppercase'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Küçük Harf', 'kanews'),
      value: 'lowercase'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Baş Harfler Büyük', 'kanews'),
      value: 'capitalize'
    }],
    onChange: newValue => handleChange('textTransform', newValue)
  })), showFontStyle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('İtalik', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
    checked: fontStyle === 'italic',
    onChange: isChecked => handleChange('fontStyle', isChecked ? 'italic' : 'normal')
  })), showTextDecoration && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
    className: "kan-control-label"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Metin Dekorasyonu', 'kanews')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
    value: textDecoration,
    options: [{
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Normal', 'kanews'),
      value: 'none'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Altı Çizili', 'kanews'),
      value: 'underline'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Üstü Çizili', 'kanews'),
      value: 'overline'
    }, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Üstü ve Altı Çizili', 'kanews'),
      value: 'underline overline'
    }],
    onChange: newValue => handleChange('textDecoration', newValue)
  })));
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
    title: label,
    initialOpen: true,
    className: "kan-control-panel"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kan-control-item kan-spacing-control"
  }, showReset && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    isSmall: true,
    isSecondary: true,
    onClick: handleReset,
    className: "kan-reset-button",
    text: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sıfırla', 'kanews')
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TabPanel, {
    className: "kan-typography-tabs",
    activeClass: "is-active",
    tabs: tabs
  }, tab => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `kan-typography-tab-content ${tab.name}`
  }, tab.name === 'basic' ? renderBasicControls() : renderAdvancedControls()))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Typography);

/***/ }),

/***/ "./src/components/VisibilityControl/index.js":
/*!***************************************************!*\
  !*** ./src/components/VisibilityControl/index.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/desktop.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/tablet.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/mobile.js");




// import './style.scss';

const DEVICE_TYPES = {
  DESKTOP: 'desktop',
  TABLET: 'tablet',
  MOBILE: 'mobile'
};
const VisibilityControl = ({
  value = {},
  onChange,
  label = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Cihaz Görünürlüğü', 'kanews')
}) => {
  const devices = {
    [DEVICE_TYPES.DESKTOP]: {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Masaüstü', 'kanews'),
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"],
      hiddenLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Masaüstünde gizli', 'kanews')
    },
    [DEVICE_TYPES.TABLET]: {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tablet', 'kanews'),
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"],
      hiddenLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Tablette gizli', 'kanews')
    },
    [DEVICE_TYPES.MOBILE]: {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Mobil', 'kanews'),
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
      hiddenLabel: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Mobilde gizli', 'kanews')
    }
  };
  const toggleDevice = device => {
    onChange({
      ...value,
      [device]: !value[device]
    });
  };
  const getHiddenLabel = device => {
    return value[device] === false ? devices[device].hiddenLabel : '';
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.BaseControl, {
    label: label,
    __nextHasNoMarginBottom: true
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kanews-visibility-control kanews-control-item"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kanews-visibility-control__devices"
  }, Object.entries(devices).map(([device, {
    label,
    icon
  }]) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Tooltip, {
    text: label,
    key: device
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    icon: icon,
    label: label,
    isPressed: value[device] !== false,
    onClick: () => toggleDevice(device),
    className: `kanews-visibility-control__device-button ${value[device] !== false ? 'is-active' : ''}`
  }))))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hidden-labels",
    style: {
      display: 'none'
    }
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hidden-desktop",
    "data-label": getHiddenLabel(DEVICE_TYPES.DESKTOP)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hidden-tablet",
    "data-label": getHiddenLabel(DEVICE_TYPES.TABLET)
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "hidden-mobile",
    "data-label": getHiddenLabel(DEVICE_TYPES.MOBILE)
  })));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (VisibilityControl);

/***/ }),

/***/ "./src/components/repeater/index.js":
/*!******************************************!*\
  !*** ./src/components/repeater/index.js ***!
  \******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/drag-handle.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/arrow-up.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/arrow-down.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/trash.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus.js");






// import './style.scss';

const RepeaterField = ({
  label,
  value,
  onChange,
  placeholder,
  type = 'text',
  component
}) => {
  if (type === 'richtext') {
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
      tagName: "div",
      value: value,
      onChange: onChange,
      placeholder: placeholder
    });
  }
  if (type === 'icon' && component) {
    const IconComponent = component;
    return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "repeater-field-icon kanews-control-item"
    }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, label), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(IconComponent, {
      value: value,
      onChange: onChange
    }));
  }
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
    label: label,
    value: value,
    onChange: onChange,
    placeholder: placeholder
  });
};
const IconButtonWithTooltip = ({
  icon,
  label,
  onClick,
  className
}) => {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Tooltip, {
    text: label
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.IconButton, {
    icon: icon,
    onClick: onClick,
    "aria-label": label,
    className: className
  }));
};
const RepeaterItem = ({
  item,
  index,
  fields,
  onChange,
  onRemove,
  onMoveUp,
  onMoveDown,
  isFirst,
  isLast,
  onDragStart,
  onDragOver,
  onDragEnd,
  isDragging
}) => {
  const [isOpen, setIsOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useState)(false);
  const itemRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);
  const toggleOpen = e => {
    // Prevent toggle if clicking on a button
    if (e.target.closest('button')) {
      return;
    }
    setIsOpen(!isOpen);
  };
  const handleDragStart = e => {
    e.dataTransfer.setData('text/plain', index);
    onDragStart(index);
  };
  const handleDragOver = e => {
    e.preventDefault();
    onDragOver(index);
  };
  const handleDragEnd = () => {
    onDragEnd();
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Card, {
    className: `repeater-item ${isDragging ? 'is-dragging' : ''}`,
    ref: itemRef,
    draggable: true,
    onDragStart: handleDragStart,
    onDragOver: handleDragOver,
    onDragEnd: handleDragEnd
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CardHeader, {
    onClick: toggleOpen,
    className: "repeater-item-header"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Flex, {
    align: "center"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FlexItem, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(IconButtonWithTooltip, {
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sürükle', 'kanews'),
    className: "drag-handle"
  })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FlexBlock, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "repeater-item-title"
  }, item[fields[0]?.name] || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Yeni Öğe', 'kanews'))), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FlexItem, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "repeater-item-actions"
  }, !isFirst && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(IconButtonWithTooltip, {
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"],
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Yukarı Taşı', 'kanews'),
    onClick: () => onMoveUp(index),
    className: "move-up-button"
  }), !isLast && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(IconButtonWithTooltip, {
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"],
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Aşağı Taşı', 'kanews'),
    onClick: () => onMoveDown(index),
    className: "move-down-button"
  }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(IconButtonWithTooltip, {
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"],
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sil', 'kanews'),
    onClick: () => onRemove(index),
    className: "delete-button is-destructive"
  }))))), isOpen && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CardBody, null, fields.map(field => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(RepeaterField, {
    key: field.name,
    label: field.label,
    value: item[field.name],
    onChange: value => onChange(index, field.name, value),
    placeholder: field.placeholder,
    type: field.type,
    component: field.component
  }))));
};
const Repeater = ({
  title,
  fields,
  items,
  onAdd,
  onRemove,
  onChange,
  onReorder,
  addButtonText,
  emptyMessage
}) => {
  const [draggedIndex, setDraggedIndex] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useState)(null);
  const [draggedOverIndex, setDraggedOverIndex] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useState)(null);
  const handleMoveUp = index => {
    if (index > 0) {
      onReorder(index, index - 1);
    }
  };
  const handleMoveDown = index => {
    if (index < items.length - 1) {
      onReorder(index, index + 1);
    }
  };
  const handleDragStart = index => {
    setDraggedIndex(index);
  };
  const handleDragOver = index => {
    if (draggedIndex !== null && draggedIndex !== index) {
      setDraggedOverIndex(index);
    }
  };
  const handleDragEnd = () => {
    if (draggedIndex !== null && draggedOverIndex !== null) {
      onReorder(draggedIndex, draggedOverIndex);
    }
    setDraggedIndex(null);
    setDraggedOverIndex(null);
  };
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "repeater-container"
  }, items.length > 0 ? items.map((item, index) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(RepeaterItem, {
    key: item.uniqueId || index,
    item: item,
    index: index,
    fields: fields,
    onChange: onChange,
    onRemove: onRemove,
    onMoveUp: handleMoveUp,
    onMoveDown: handleMoveDown,
    isFirst: index === 0,
    isLast: index === items.length - 1,
    onDragStart: handleDragStart,
    onDragOver: handleDragOver,
    onDragEnd: handleDragEnd,
    isDragging: index === draggedIndex
  })) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "repeater-empty"
  }, emptyMessage), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    isPrimary: true,
    onClick: onAdd,
    className: "components-button editor-post-publish-button editor-post-publish-button__button is-primary",
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"]
  }, addButtonText));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Repeater);

/***/ }),

/***/ "./src/editor.scss":
/*!*************************!*\
  !*** ./src/editor.scss ***!
  \*************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/style.scss":
/*!************************!*\
  !*** ./src/style.scss ***!
  \************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

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


/***/ }),

/***/ "./src/utils/Loading/index.js":
/*!************************************!*\
  !*** ./src/utils/Loading/index.js ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* 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_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);



const Loading = ({
  text = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Yükleniyor...', 'kanews')
}) => {
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "kanews-loading"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Spinner, null), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, text));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Loading);

/***/ }),

/***/ "./src/utils/icons.js":
/*!****************************!*\
  !*** ./src/utils/icons.js ***!
  \****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Icons: () => (/* binding */ Icons),
/* harmony export */   kanewsIcons: () => (/* binding */ kanewsIcons)
/* 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__);

/**
 * Kanews ikonları
 */
const kanewsIcons = [{
  label: 'Arama',
  value: 'icon-search'
}, {
  label: 'Zarf',
  value: 'icon-envelope'
}, {
  label: 'Kullanıcı',
  value: 'icon-user'
}, {
  label: 'Ana Sayfa',
  value: 'icon-home'
}, {
  label: 'Ekle',
  value: 'icon-add'
}, {
  label: 'Galeri',
  value: 'icon-gallery'
}, {
  label: 'Değişim',
  value: 'icon-exchange'
}, {
  label: 'Düzenle',
  value: 'icon-edit'
}, {
  label: 'Yerel',
  value: 'icon-local'
}, {
  label: 'Konum',
  value: 'icon-location'
}, {
  label: 'Pin',
  value: 'icon-pin'
}, {
  label: 'Telefon',
  value: 'icon-call'
}, {
  label: 'Yorum',
  value: 'icon-comment'
}, {
  label: 'Anahtar',
  value: 'icon-vpn_key'
}, {
  label: 'Menü',
  value: 'icon-menu'
}, {
  label: 'Menü 2',
  value: 'icon-menu2'
}, {
  label: 'Canlı',
  value: 'icon-live'
}, {
  label: 'Yıldız',
  value: 'icon-star'
}, {
  label: 'Yıldız (Boş)',
  value: 'icon-star-o'
}, {
  label: 'Yarım Yıldız',
  value: 'icon-star-half'
}, {
  label: 'Yer İmi',
  value: 'icon-bookmark'
}, {
  label: 'Yer İmi (Boş)',
  value: 'icon-bookmark-o'
}, {
  label: 'Tamamlandı',
  value: 'icon-done'
}, {
  label: 'Ayarlar',
  value: 'icon-settings'
}, {
  label: 'Beğen',
  value: 'icon-like'
}, {
  label: 'Beğen (Boş)',
  value: 'icon-like-o'
}, {
  label: 'Çıkış',
  value: 'icon-logout'
}, {
  label: 'Sıralama',
  value: 'icon-standings'
}, {
  label: 'Makale',
  value: 'icon-article'
}, {
  label: 'Covid',
  value: 'icon-covid'
}, {
  label: 'Ok',
  value: 'icon-caret'
}, {
  label: 'Uzun Ok',
  value: 'icon-arrow-long'
}, {
  label: 'Ok',
  value: 'icon-arrow'
}, {
  label: 'Video',
  value: 'icon-video'
}, {
  label: 'Mikrofon',
  value: 'icon-mic'
}, {
  label: 'Bildirimler',
  value: 'icon-notifications'
}, {
  label: 'Görüntüle',
  value: 'icon-view'
}, {
  label: 'Izgara',
  value: 'icon-grid'
}, {
  label: 'Şimşek',
  value: 'icon-bolt'
}, {
  label: 'Tumblr',
  value: 'icon-tumblr'
}, {
  label: 'Kapat',
  value: 'icon-close'
}, {
  label: 'Kilidi Aç',
  value: 'icon-unlock'
}, {
  label: 'Ay (Dolu)',
  value: 'icon-moon-fill'
}, {
  label: 'Hava Durumu',
  value: 'icon-weather'
}, {
  label: 'Alıntı',
  value: 'icon-quotes-left'
}, {
  label: 'Güneş',
  value: 'icon-sun'
}, {
  label: 'Facebook',
  value: 'icon-facebook'
}, {
  label: 'Instagram',
  value: 'icon-instagram'
}, {
  label: 'WhatsApp',
  value: 'icon-whatsapp'
}, {
  label: 'Twitter',
  value: 'icon-twitter'
}, {
  label: 'YouTube',
  value: 'icon-youtube'
}, {
  label: 'LinkedIn',
  value: 'icon-linkedin'
}, {
  label: 'Pinterest',
  value: 'icon-pinterest'
}, {
  label: 'Trafik',
  value: 'icon-traffic'
}, {
  label: 'Paylaş',
  value: 'icon-share'
}, {
  label: 'Bitcoin',
  value: 'icon-bitcoin'
}, {
  label: 'Para',
  value: 'icon-money'
}, {
  label: 'Gazete',
  value: 'icon-newspaper'
}, {
  label: 'Telegram',
  value: 'icon-telegram'
}, {
  label: 'Eczane',
  value: 'icon-local_pharmacy'
}, {
  label: 'Tip',
  value: 'icon-type'
}, {
  label: 'Abonelikler',
  value: 'icon-subscriptions'
}];
const Icons = {
  reset: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 24 24",
    width: "16",
    height: "16",
    fill: "currentColor"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"
  })),
  alignLeft: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 24 24",
    width: "16",
    height: "16",
    fill: "currentColor"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M9 9v6h11V9H9zM4 20h1.5V4H4v16z"
  })),
  alignCenter: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 24 24",
    width: "16",
    height: "16",
    fill: "currentColor"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M20 9v6H4V9h16zm-3 4H7v-2h10v2z"
  })),
  alignRight: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 24 24",
    width: "16",
    height: "16",
    fill: "currentColor"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M4 9v6h11V9H4zm16 11h-1.5V4H20v16z"
  })),
  alignJustify: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: "0 0 24 24",
    width: "16",
    height: "16",
    fill: "currentColor"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M4 9h16v2H4V9zm0 4h16v2H4v-2z"
  })),
  desktop: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    width: "16",
    height: "16",
    viewBox: "0 0 24 24"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M20 3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h6l-2 2v1h8v-1l-2-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 13H4V5h16v11z"
  })),
  tablet: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    width: "16",
    height: "16",
    viewBox: "0 0 24 24"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M18 0H6C4.34 0 3 1.34 3 3v18c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm-4 22h-4v-1h4v1zm5.25-3H4.75V3h14.5v16z"
  })),
  mobile: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
    width: "16",
    height: "16",
    viewBox: "0 0 24 24"
  }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
    d: "M16 1H8C6.34 1 5 2.34 5 4v16c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V4c0-1.66-1.34-3-3-3zm-2 20h-4v-1h4v1zm3.25-3H6.75V4h10.5v14z"
  }))
};

/***/ }),

/***/ "./src/utils/styles.js":
/*!*****************************!*\
  !*** ./src/utils/styles.js ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   getBorderStyles: () => (/* binding */ getBorderStyles),
/* harmony export */   getSpacingStyles: () => (/* binding */ getSpacingStyles),
/* harmony export */   getStyles: () => (/* binding */ getStyles),
/* harmony export */   getTypographyStyles: () => (/* binding */ getTypographyStyles)
/* harmony export */ });
/**
 * CSS özelliklerini string'e dönüştürür
 * @param {Object} styles CSS özellikleri
 * @returns {string} CSS string
 */
const getStyles = (styles = {}) => {
  if (!styles || Object.keys(styles).length === 0) return '';
  return Object.entries(styles).map(([key, value]) => {
    // camelCase'i kebab-case'e çevir
    const cssKey = key.replace(/([A-Z])/g, '-$1').toLowerCase();
    return `${cssKey}: ${value}`;
  }).join('; ');
};

/**
 * Typography özelliklerini CSS'e dönüştürür
 * @param {Object} typography Typography özellikleri
 * @returns {Object} CSS özellikleri
 */
const getTypographyStyles = (typography = {}, important = false) => {
  const styles = {};
  if (typography.fontFamily) styles.fontFamily = typography.fontFamily + (important ? ' !important' : '');
  if (typography.fontSize) styles.fontSize = typography.fontSize + (important ? ' !important' : '');
  if (typography.fontWeight) styles.fontWeight = typography.fontWeight + (important ? ' !important' : '');
  if (typography.lineHeight) styles.lineHeight = typography.lineHeight + (important ? ' !important' : '');
  if (typography.letterSpacing) styles.letterSpacing = typography.letterSpacing + (important ? ' !important' : '');
  if (typography.textTransform) styles.textTransform = typography.textTransform + (important ? ' !important' : '');
  if (typography.fontStyle) styles.fontStyle = typography.fontStyle + (important ? ' !important' : '');
  if (typography.textDecoration) styles.textDecoration = typography.textDecoration + (important ? ' !important' : '');
  if (typography.color) styles.color = typography.color + (important ? ' !important' : '');
  if (typography.textAlign) styles.textAlign = typography.textAlign + (important ? ' !important' : '');
  return styles;
};

/**
 * Spacing özelliklerini CSS'e dönüştürür
 * @param {Object} spacing Spacing özellikleri
 * @returns {Object} CSS özellikleri
 */
const getSpacingStyles = (spacing, prefix = '') => {
  if (!spacing) return {};
  const styles = {};

  // Desktop spacing
  if (spacing.desktop) {
    if (spacing.desktop.top) styles['top'] = `${spacing.desktop.top}px`;
    if (spacing.desktop.right) styles['right'] = `${spacing.desktop.right}px`;
    if (spacing.desktop.bottom) styles['bottom'] = `${spacing.desktop.bottom}px`;
    if (spacing.desktop.left) styles['left'] = `${spacing.desktop.left}px`;
  }

  // Tablet spacing
  if (spacing.tablet) {
    if (spacing.tablet.top) styles['top-tablet'] = `${spacing.tablet.top}px`;
    if (spacing.tablet.right) styles['right-tablet'] = `${spacing.tablet.right}px`;
    if (spacing.tablet.bottom) styles['bottom-tablet'] = `${spacing.tablet.bottom}px`;
    if (spacing.tablet.left) styles['left-tablet'] = `${spacing.tablet.left}px`;
  }

  // Mobile spacing
  if (spacing.mobile) {
    if (spacing.mobile.top) styles['top-mobile'] = `${spacing.mobile.top}px`;
    if (spacing.mobile.right) styles['right-mobile'] = `${spacing.mobile.right}px`;
    if (spacing.mobile.bottom) styles['bottom-mobile'] = `${spacing.mobile.bottom}px`;
    if (spacing.mobile.left) styles['left-mobile'] = `${spacing.mobile.left}px`;
  }
  if (prefix) {
    Object.keys(styles).forEach(key => {
      styles[`--${prefix}-${key}`] = styles[key];
      delete styles[key];
    });
  }
  return styles;
};

/**
 * Border özelliklerini CSS'e dönüştürür
 * @param {Object} border Border özellikleri
 * @returns {Object} CSS özellikleri
 */
const getBorderStyles = (border, prefix = '') => {
  if (!border) return {};
  const styles = {};

  // Desktop border
  if (border.desktop) {
    // Border style
    if (border.desktop.style) {
      styles['border-style'] = border.desktop.style;
    }

    // Border color
    if (border.desktop.color) {
      styles['border-color'] = border.desktop.color;
    }

    // Border width
    if (border.desktop.width) {
      if (border.desktop.width.top) styles['border-top-width'] = `${border.desktop.width.top}px`;
      if (border.desktop.width.right) styles['border-right-width'] = `${border.desktop.width.right}px`;
      if (border.desktop.width.bottom) styles['border-bottom-width'] = `${border.desktop.width.bottom}px`;
      if (border.desktop.width.left) styles['border-left-width'] = `${border.desktop.width.left}px`;
    }

    // Border radius
    if (border.desktop.radius) {
      if (border.desktop.radius.topLeft) styles['border-top-left-radius'] = `${border.desktop.radius.topLeft}px`;
      if (border.desktop.radius.topRight) styles['border-top-right-radius'] = `${border.desktop.radius.topRight}px`;
      if (border.desktop.radius.bottomRight) styles['border-bottom-right-radius'] = `${border.desktop.radius.bottomRight}px`;
      if (border.desktop.radius.bottomLeft) styles['border-bottom-left-radius'] = `${border.desktop.radius.bottomLeft}px`;
    }
  }

  // Tablet border
  if (border.tablet) {
    // Border style
    if (border.tablet.style) {
      styles['border-style-tablet'] = border.tablet.style;
    }

    // Border color
    if (border.tablet.color) {
      styles['border-color-tablet'] = border.tablet.color;
    }

    // Border width
    if (border.tablet.width) {
      if (border.tablet.width.top) styles['border-top-width-tablet'] = `${border.tablet.width.top}px`;
      if (border.tablet.width.right) styles['border-right-width-tablet'] = `${border.tablet.width.right}px`;
      if (border.tablet.width.bottom) styles['border-bottom-width-tablet'] = `${border.tablet.width.bottom}px`;
      if (border.tablet.width.left) styles['border-left-width-tablet'] = `${border.tablet.width.left}px`;
    }

    // Border radius
    if (border.tablet.radius) {
      if (border.tablet.radius.topLeft) styles['border-top-left-radius-tablet'] = `${border.tablet.radius.topLeft}px`;
      if (border.tablet.radius.topRight) styles['border-top-right-radius-tablet'] = `${border.tablet.radius.topRight}px`;
      if (border.tablet.radius.bottomRight) styles['border-bottom-right-radius-tablet'] = `${border.tablet.radius.bottomRight}px`;
      if (border.tablet.radius.bottomLeft) styles['border-bottom-left-radius-tablet'] = `${border.tablet.radius.bottomLeft}px`;
    }
  }

  // Mobile border
  if (border.mobile) {
    // Border style
    if (border.mobile.style) {
      styles['border-style-mobile'] = border.mobile.style;
    }

    // Border color
    if (border.mobile.color) {
      styles['border-color-mobile'] = border.mobile.color;
    }

    // Border width
    if (border.mobile.width) {
      if (border.mobile.width.top) styles['border-top-width-mobile'] = `${border.mobile.width.top}px`;
      if (border.mobile.width.right) styles['border-right-width-mobile'] = `${border.mobile.width.right}px`;
      if (border.mobile.width.bottom) styles['border-bottom-width-mobile'] = `${border.mobile.width.bottom}px`;
      if (border.mobile.width.left) styles['border-left-width-mobile'] = `${border.mobile.width.left}px`;
    }

    // Border radius
    if (border.mobile.radius) {
      if (border.mobile.radius.topLeft) styles['border-top-left-radius-mobile'] = `${border.mobile.radius.topLeft}px`;
      if (border.mobile.radius.topRight) styles['border-top-right-radius-mobile'] = `${border.mobile.radius.topRight}px`;
      if (border.mobile.radius.bottomRight) styles['border-bottom-right-radius-mobile'] = `${border.mobile.radius.bottomRight}px`;
      if (border.mobile.radius.bottomLeft) styles['border-bottom-left-radius-mobile'] = `${border.mobile.radius.bottomLeft}px`;
    }
  }
  if (prefix) {
    Object.keys(styles).forEach(key => {
      // Add double 'border-' prefix for border properties

      styles[`--${key}`] = styles[key];
      delete styles[key];
    });
  }
  return styles;
};

/***/ }),

/***/ "./src/utils/typography.js":
/*!*********************************!*\
  !*** ./src/utils/typography.js ***!
  \*********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   getTypographyStyles: () => (/* binding */ getTypographyStyles)
/* harmony export */ });
/**
 * Typography stillerini döndürür
 * @param {Object} typography - Typography ayarları
 * @returns {Object} Typography stilleri
 */
const getTypographyStyles = (typography = {}) => {
  const styles = {};
  if (typography.fontFamily) styles.fontFamily = typography.fontFamily;
  if (typography.fontSize) styles.fontSize = typography.fontSize;
  if (typography.fontWeight) styles.fontWeight = typography.fontWeight;
  if (typography.lineHeight) styles.lineHeight = typography.lineHeight;
  if (typography.letterSpacing) styles.letterSpacing = typography.letterSpacing;
  if (typography.textTransform) styles.textTransform = typography.textTransform;
  if (typography.fontStyle) styles.fontStyle = typography.fontStyle;
  if (typography.textDecoration) styles.textDecoration = typography.textDecoration;
  if (typography.color) styles.color = typography.color;
  if (typography.textAlign) styles.textAlign = typography.textAlign;
  return styles;
};

/***/ }),

/***/ "@wordpress/api-fetch":
/*!**********************************!*\
  !*** external ["wp","apiFetch"] ***!
  \**********************************/
/***/ ((module) => {

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

/***/ "@wordpress/core-data":
/*!**********************************!*\
  !*** external ["wp","coreData"] ***!
  \**********************************/
/***/ ((module) => {

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

/***/ "@wordpress/server-side-render":
/*!******************************************!*\
  !*** external ["wp","serverSideRender"] ***!
  \******************************************/
/***/ ((module) => {

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

/***/ }),

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

module.exports = window["React"];

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// 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 needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
(() => {
/*!**********************!*\
  !*** ./src/index.js ***!
  \**********************/
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ "./src/style.scss");
/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./editor.scss */ "./src/editor.scss");
/* harmony import */ var _blocks_gallery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blocks/gallery */ "./src/blocks/gallery/index.js");
/* harmony import */ var _blocks_related_posts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./blocks/related-posts */ "./src/blocks/related-posts/index.js");
/* harmony import */ var _blocks_calculator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./blocks/calculator */ "./src/blocks/calculator/index.js");
/* harmony import */ var _blocks_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./blocks/button */ "./src/blocks/button/index.js");
/* harmony import */ var _blocks_alert__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./blocks/alert */ "./src/blocks/alert/index.js");
/* harmony import */ var _blocks_faq__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./blocks/faq */ "./src/blocks/faq/index.js");
/* harmony import */ var _blocks_faq_item__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./blocks/faq-item */ "./src/blocks/faq-item/index.js");
/* harmony import */ var _blocks_table_of_contents__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./blocks/table-of-contents */ "./src/blocks/table-of-contents/index.js");
/* harmony import */ var _blocks_timeline__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./blocks/timeline */ "./src/blocks/timeline/index.js");
/* harmony import */ var _blocks_timeline_item__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./blocks/timeline-item */ "./src/blocks/timeline-item/index.js");
/* harmony import */ var _blocks_bibliography__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./blocks/bibliography */ "./src/blocks/bibliography/index.js");
// Import styles



// Import all blocks











})();

/******/ })()
;
//# sourceMappingURL=blocks.js.map