"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const vue = require("vue");
const isEqual = require("../../../../../lodash-es/isEqual.js");
const get = require("../../../../../lodash-es/get.js");
const defaultProps = {
  label: "label",
  value: "value",
  disabled: "disabled",
  options: "options"
};
function useProps(props) {
  const aliasProps = vue.ref({
    ...defaultProps,
    ...props.props
  });
  let cache = { ...props.props };
  vue.watch(() => props.props, (val) => {
    if (!isEqual.default(val, cache)) {
      aliasProps.value = {
        ...defaultProps,
        ...val
      };
      cache = { ...val };
    }
  }, { deep: true });
  const getLabel = (option) => get.default(option, aliasProps.value.label);
  const getValue = (option) => get.default(option, aliasProps.value.value);
  const getDisabled = (option) => get.default(option, aliasProps.value.disabled);
  const getOptions = (option) => get.default(option, aliasProps.value.options);
  return {
    aliasProps,
    getLabel,
    getValue,
    getDisabled,
    getOptions
  };
}
exports.defaultProps = defaultProps;
exports.useProps = useProps;
