"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useSupported = useSupported;
var _tryOnMounted = require("./tryOnMounted");
var _vueDemi = require("vue-demi");
function useSupported(callback) {
  let sync = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  const isSupported = (0, _vueDemi.shallowRef)();
  const update = () => isSupported.value = Boolean(callback());
  update();
  (0, _tryOnMounted.tryOnMounted)(update, sync);
  return isSupported;
}