"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _vue = require("vue");
var _useControlledState = _interopRequireDefault(require("../../_util/hooks/useControlledState"));
var _util = require("../util");
const useColorState = (defaultValue, value) => {
  const [mergedValue, setValue] = (0, _useControlledState.default)(defaultValue, value);
  const color = (0, _vue.computed)(() => (0, _util.generateColor)(mergedValue.value));
  return [color, setValue];
};
var _default = exports.default = useColorState;