var linker = function (component, handleInput) {
    return function (key) {
        if (typeof key !== 'string')
            throw new Error('Only keys of type string are allowed');
        var capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1);
        var value = component[key];
        return {
            key: key,
            value: Array.isArray(value) ? value.slice() : value,
            label: component['label' + capitalizedKey],
            placeholder: component['placeholder' + capitalizedKey],
            onInput: handleInput.bind(component, key)
        };
    };
};
export { linker as l };
