"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = BlockDraggableChip;
var _reactNative = require("react-native");
var _icons = require("@wordpress/icons");
var _compose = require("@wordpress/compose");
var _blockIcon = _interopRequireDefault(require("../block-icon"));
var _style = _interopRequireDefault(require("./style.scss"));
var _jsxRuntime = require("react/jsx-runtime");
/**
 * External dependencies
 */

/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

const shadowStyle = {
  shadowColor: '#000',
  shadowOffset: {
    width: 0,
    height: 2
  },
  shadowOpacity: 0.25,
  shadowRadius: 3.84,
  elevation: 5
};

/**
 * Block draggable chip component
 *
 * @param {Object} props        Component props.
 * @param {Object} [props.icon] Block icon.
 * @return {JSX.Element} Chip component.
 */
function BlockDraggableChip({
  icon
}) {
  const containerStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default['draggable-chip__container'], _style.default['draggable-chip__container--dark']);
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
    style: [containerStyle, shadowStyle],
    testID: "draggable-chip",
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_blockIcon.default, {
      icon: _icons.dragHandle
    }), icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockIcon.default, {
      icon: icon
    })]
  });
}
//# sourceMappingURL=draggable-chip.native.js.map