import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import { Col, Row } from "antd";
import { ProgressBar } from "./Icons";
export const VoteBar = ({ proposal, timeData }) => {
    const yesVotes = Number(proposal.vote_yes?.quantity?.split(" ")[0]);
    const noVotes = Number(proposal.vote_no?.quantity?.split(" ")[0]);
    return (_jsxs(Col, { className: "votes", children: [_jsxs(Row, { className: "votes-txt", children: [_jsxs("p", { className: "paragraph-2b", children: [" ", yesVotes, " yes votes "] }), _jsxs("p", { className: "paragraph-2b", children: [" ", noVotes, " no votes "] })] }), _jsx(ProgressBar, { width: "95%", proposal: proposal }), _jsxs(Row, { className: "votes-txt", children: [_jsxs("p", { className: "paragraph-2b", children: [timeData.time_to_start_secs > 0 ? "Starting" : "Started", " ", timeData.time_to_start, " "] }), _jsxs("p", { className: "paragraph-2b", children: [timeData.time_left_seconds > 0 ? "Ending" : "Ended", " ", timeData.time_left_from_now, " "] })] })] }));
};
export const VoteBarFull = ({ proposal, timeData }) => {
    const yesVotes = Number(proposal.vote_yes?.quantity?.split(" ")[0]);
    const noVotes = Number(proposal.vote_no?.quantity?.split(" ")[0]);
    return (_jsxs(Col, { className: "votes", children: [_jsxs(Row, { justify: "space-between", children: [_jsxs("p", { className: "paragraph-2b", children: [" ", yesVotes, " yes votes "] }), _jsxs("p", { className: "paragraph-2b", children: [" ", noVotes, " no votes "] })] }), _jsx(ProgressBar, { width: "100%", proposal: proposal }), _jsxs(Row, { justify: "space-between", children: [_jsxs("p", { className: "paragraph-2b", children: [timeData.time_to_start_secs > 0 ? "Starting" : "Started", " ", timeData.time_to_start, " "] }), _jsxs("p", { className: "paragraph-2b", children: [timeData.time_left_seconds > 0 ? "Ending" : "Ended", " ", timeData.time_left_from_now, " "] })] })] }));
};
//# sourceMappingURL=VoteBar.js.map