 let sg = (src) => {};

export default function(name, getCallback, setCallback) {
    return {
        get() {
            if (getCallback) {
                return getCallback(this[name]);
            }
            return this[name];
        },
        set(v) {
            if (setCallback) {
                v = setCallback(v);
            }
            this.$emit(name == "value" ? `input` : `update:${name}`, v);
        }
    };
}
