export default function (component, key, value) {
    const prop = component.props[key];
    switch (typeof prop) {
        case 'object':
            prop.default = value;
            break;
        case 'function':
            component.props[key] = {
                type: prop,
                default: value,
            };
            break;
        case 'undefined':
            throw new Error('unknown prop: ' + key);
        default:
            throw new Error('unhandled type: ' + typeof prop);
    }
}
