import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import { SelectableRow } from './SelectableRow';
const S = StyleSheet.create({
    container: {
        flex: 1
    }
});
export class SelectableList extends Component {
    constructor() {
        super(...arguments);
        this.renderItem = (item, index) => {
            return (<SelectableRow key={item.id || index} title={item.title} selected={item.id === this.props.selectedId} onPress={this.handlePress(item)} {...this.props.selectableRow}/>);
        };
        this.handlePress = (item) => () => {
            this.props.onChange(item);
        };
    }
    render() {
        return (<View style={[S.container, this.props.style]}>
        {this.props.items.map(this.renderItem)}
      </View>);
    }
}
//# sourceMappingURL=SelectableList.js.map