(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "tslib", "react"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.useStateProps = void 0;
    var tslib_1 = require("tslib");
    var react_1 = require("react");
    function useStateProps(arg) {
        var _a = (0, tslib_1.__read)((0, react_1.useState)(arg), 2), value = _a[0], setValue = _a[1];
        (0, react_1.useEffect)(function () {
            setValue(arg);
        }, [arg]);
        return [value, setValue];
    }
    exports.useStateProps = useStateProps;
});
