var _excluded = ["triggerType", "searchMode", "showConfirmButton", "enableScanner", "autoFocusOnOpen"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React, { forwardRef } from 'react';
import PisellFindPro from "../../../pro/pisellFindPro";
/**
 * GlobalSearchFind —— 全局搜索专用「搜索输入框」子组件。
 *
 * 底层改用 `PisellFindPro`：输入栏为 `ComprehensiveSearch` 的 `SearchSection`（摄像头 + 输入框 +
 * 搜索按钮），搜索状态机仍复用 PisellFind / PisellLookup。FullPage 与 Modal 两种形态共用同一套预设：
 * - 提交式：`searchMode='confirm'` + `showConfirmButton`，仅回车 / 点搜索按钮才触发 `onSearch`；
 * - 输入栏自带前缀放大镜、清除、摄像头（点击走宿主原生扫码）；硬件扫码枪监听（`enableScanner`）
 *   默认仍关闭，需要时由调用方显式开启；
 * - 形态差异仅由 `displayType` 决定：
 *   - FullPage 传 `displayType='inline'`（纯受控输入框，结果在页面双栏 body 自渲染，不传 resultRender）；
 *   - Modal 传 `displayType='modal'`（自带弹层 + `resultRender` 承载结果）。
 *
 * 所有预设均可被外部 props 覆盖（如 Demo 顶栏用 `triggerType='icon'`）。
 */
export var GlobalSearchFind = /*#__PURE__*/forwardRef(function (props, ref) {
  var _props$triggerType = props.triggerType,
    triggerType = _props$triggerType === void 0 ? 'input' : _props$triggerType,
    _props$searchMode = props.searchMode,
    searchMode = _props$searchMode === void 0 ? 'confirm' : _props$searchMode,
    _props$showConfirmBut = props.showConfirmButton,
    showConfirmButton = _props$showConfirmBut === void 0 ? true : _props$showConfirmBut,
    _props$enableScanner = props.enableScanner,
    enableScanner = _props$enableScanner === void 0 ? false : _props$enableScanner,
    _props$autoFocusOnOpe = props.autoFocusOnOpen,
    autoFocusOnOpen = _props$autoFocusOnOpe === void 0 ? false : _props$autoFocusOnOpe,
    rest = _objectWithoutProperties(props, _excluded);
  return /*#__PURE__*/React.createElement(PisellFindPro, _extends({
    ref: ref,
    triggerType: triggerType,
    searchMode: searchMode,
    showConfirmButton: showConfirmButton,
    enableScanner: enableScanner,
    autoFocusOnOpen: autoFocusOnOpen
  }, rest));
});
GlobalSearchFind.displayName = 'GlobalSearchFind';
export default GlobalSearchFind;