"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = LinkEditor;
var _clsx = _interopRequireDefault(require("clsx"));
var _i18n = require("@wordpress/i18n");
var _components = require("@wordpress/components");
var _icons = require("@wordpress/icons");
var _urlInput = _interopRequireDefault(require("../url-input"));
var _jsxRuntime = require("react/jsx-runtime");
/**
 * External dependencies
 */

/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

function LinkEditor({
  autocompleteRef,
  className,
  onChangeInputValue,
  value,
  ...props
}) {
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
    className: (0, _clsx.default)('block-editor-url-popover__link-editor', className),
    ...props,
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_urlInput.default, {
      __nextHasNoMarginBottom: true,
      value: value,
      onChange: onChangeInputValue,
      autocompleteRef: autocompleteRef
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
      icon: _icons.keyboardReturn,
      label: (0, _i18n.__)('Apply'),
      type: "submit",
      size: "compact"
    })]
  });
}
//# sourceMappingURL=link-editor.js.map