'use strict';
'use client';
import { jsxs, jsx } from 'react/jsx-runtime';
import { Select, SelectTrigger, SelectValue, SelectContent, SelectGroup, SelectItem } from '../../../../fd-component-toolbox/select/Select.js';
import { MultiBrowser } from '../../../browsers/multi-browser/MultiBrowser.js';
import { browserFilterTypes } from '../filter-constants.js';
import { getFilterShortValue } from '../filter-display.js';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
  value,
  configurable: true
});
function GuidFilter({
  filterOperatorType,
  onOperatorTypeChange,
  selectedResourceIds,
  propertyMeta,
  onBrowserChange,
  disabled,
  inputId,
  onClose,
  ref,
  parentContextName
}) {
  return /* @__PURE__ */jsxs("div", {
    className: "flex flex-row items-center gap-1",
    children: [/* @__PURE__ */jsx("div", {
      className: "w-full max-w-9",
      children: /* @__PURE__ */jsxs(Select, {
        value: filterOperatorType,
        onValueChange: value => onOperatorTypeChange(value ?? void 0),
        children: [/* @__PURE__ */jsx(SelectTrigger, {
          id: inputId,
          variant: "float",
          className: "flex justify-center gap-px",
          size: "short",
          children: /* @__PURE__ */jsx(SelectValue, {
            children: getFilterShortValue(browserFilterTypes, filterOperatorType)
          })
        }), /* @__PURE__ */jsx(SelectContent, {
          children: /* @__PURE__ */jsx(SelectGroup, {
            children: browserFilterTypes.map(item => /* @__PURE__ */jsx(SelectItem, {
              value: item.type,
              className: "min-h-6",
              children: item.text
            }, item.type))
          })
        })]
      })
    }), /* @__PURE__ */jsx(MultiBrowser, {
      selectedResourceIds,
      propertyMeta,
      required: false,
      onChange: onBrowserChange,
      onClose,
      disabled,
      variant: "float",
      ref,
      parentContextName
    })]
  });
}
__name(GuidFilter, "GuidFilter");

export { GuidFilter };
