"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-nocheck
const react_1 = __importDefault(require("react"));
const react_native_1 = require("react-native");
const react_native_check_box_1 = __importDefault(require("react-native-check-box"));
const styled_components_1 = require("styled-components");
const Polls = ({ containerStyle, polls }) => {
    const { totalVotes, options, onOptionSelected, pollId } = polls;
    const { colors } = react_1.default.useContext(styled_components_1.ThemeContext);
    return (react_1.default.createElement(react_native_1.View, { style: Object.assign(Object.assign({}, containerStyle), { minWidth: 150, maxWidth: 250 }) },
        react_1.default.createElement(react_native_1.View, { style: {
                paddingLeft: 5,
                paddingRight: 5,
                flexGrow: 0,
                marginTop: 10,
                marginBottom: 10,
            } }, (options || []).map((option, index) => {
            const { text, selected } = option;
            return (react_1.default.createElement(react_native_check_box_1.default, { 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'] }));
        }))));
};
exports.default = Polls;
//# sourceMappingURL=MessagePolls.js.map