// @ts-nocheck
import React from 'react';
import { View, } from 'react-native';
import CheckBox from 'react-native-check-box';
import { ThemeContext } from 'styled-components';
const Polls = ({ containerStyle, polls, }) => {
    const { totalVotes, options, onOptionSelected, pollId, } = polls;
    const { colors } = React.useContext(ThemeContext);
    return (<View style={{ ...containerStyle, minWidth: 150, maxWidth: 250 }}>
			<View style={{
        paddingLeft: 5, paddingRight: 5, flexGrow: 0, marginTop: 10, marginBottom: 10,
    }}>
				{(options || []).map((option, index) => {
        const { text, selected } = option;
        return (<CheckBox key={`polls${pollId}${index}`} style={{
            paddingLeft: 10, paddingRight: 10, height: 40, marginTop: 3, marginBottom: 3, backgroundColor: selected ? colors.primary['700'] : colors.secondary['700'], justifyContent: 'center', borderRadius: 5,
        }} onClick={() => {
            onOptionSelected(pollId, text, index);
        }} isChecked={selected} rightText={text} rightTextStyle={{ color: colors.textPrimary['100'] }} checkedCheckBoxColor={colors.textPrimary['100']} uncheckedCheckBoxColor={colors.textPrimary['100']}/>);
    })}
			</View>
		</View>);
};
export default Polls;
//# sourceMappingURL=MessagePolls.js.map