import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import { Link } from "react-router-dom";
import { Avatar, Button, Col, Row, Tooltip } from "antd";
import { Hands, ProgressBar } from "./Icons";
import { Info } from "../../../Components/Icons/Info";
import { ContentImage } from "../../../Components/Image";
export const ProposalRow = ({ daoOwner, proposal, buttonType, wrapperClass }) => {
    const randomStatus = () => {
        const statuses = ["approved", "declined", "expired", "live"];
        const randomIndex = Math.floor(Math.random() * statuses.length);
        return statuses[randomIndex];
    };
    const status = randomStatus();
    return _jsx(Link, { to: `/dao/${daoOwner}/proposal/${proposal.id}`, children: _jsxs(Row, { className: wrapperClass, align: "middle", children: [_jsxs(Row, { align: "middle", className: "u-margin-left-large", children: [_jsxs("p", { className: "header-5 u-margin-right-large", children: ["#", proposal.id] }), _jsx("span", { className: "u-margin-right-large", children: _jsx(Hands, {}) }), _jsx("p", { className: "u-dao-h-35px-r", children: proposal.title })] }), _jsxs(Row, { align: "middle", className: "u-margin-right-large", children: [_jsxs(Row, { align: "middle", className: " proposal-list-timestamp-ctn u-margin-right-large", children: [_jsx("p", { className: "header-5 u-margin-right-large", children: proposal.date }), _jsx("p", { className: "header-5", children: proposal.time })] }), _jsxs(Row, { className: "proposal-list-btns-ctn", children: [_jsx(Button, { className: `u-dao-proposal-${proposal.status || status}-tag-status-btn u-margin-right-medium`, children: proposal.status || status }), _jsx(Link, { to: `/dao/${daoOwner}/proposal/${proposal.id}`, children: _jsx(Button, { children: buttonType }) })] })] })] }) });
};
export const ProposalCard = ({ proposal }) => {
    return _jsx(Link, { to: `/newlife-dao/proposal/${proposal.id}`, children: _jsxs(Col, { className: "proposal-list-card-wrapper", children: [_jsxs(Row, { className: "u-dao-card-top-details-wrapper", align: "middle", justify: "space-between", children: [_jsxs(Row, { className: "u-dao-card-top-details-left", align: "middle", children: [_jsxs("p", { className: "proposal-list-id-p", children: ["#", proposal.id] }), _jsx("span", { className: "proposal-list-hands-icon-span", children: _jsx(Hands, {}) }), _jsx("p", { className: "proposal-list-title-p", children: proposal.title })] }), _jsx(Row, { className: "u-dao-card-top-details-right", children: _jsx(Link, { to: `/newlife-dao/proposal/${proposal.id}`, children: _jsx(Button, { children: "View" }) }) })] }), _jsxs(Row, { className: "u-dao-card-mid-details-wrapper", children: [_jsxs("p", { className: "proposal-list-votes-p", children: [proposal.votes, " Votes"] }), _jsx(ProgressBar, { width: "642px", proposal: proposal }), _jsxs(Col, { className: "proposal-list-vote-threshold-and-tooltip-ctn", children: [_jsx("p", { className: "proposal-list-time-left-p", children: "Time Left: 3 Days" || proposal.time }), _jsxs(Row, { align: "middle", children: [_jsx("p", { className: "view-proposal-vote-threshold-p", children: `Vote Threshold: ${proposal.vote_threshold || "50"}%` }), _jsx(Tooltip, { title: "The amount of votes it has left to be approved!", children: _jsx(Row, { align: "middle", children: _jsx(Info, { color: "white" }) }) })] })] })] }), _jsxs("p", { className: "proposal-list-summary-p", children: [" ", proposal.summary] }), _jsx("p", { className: "proposal-list-proposal-by-p", children: "Proposal by" }), _jsxs(Row, { className: "u-dao-card-btm-details-wrapper", children: [_jsx(Col, { className: "proposal-list-card-btm-user-details-left-ctn", children: _jsxs(Link, { className: "proposal-list-proposal-avi-link", to: `/user/${proposal.proposer.username}`, children: [" ", _jsx(Avatar, { src: _jsx(ContentImage, { ...proposal.proposer }), className: "proposal-list-proposal-avi-cmpt" })] }) }), _jsxs(Col, { className: "proposal-list-card-btm-user-details-right-ctn", children: [_jsx("p", { className: "proposal-list-card-btm-user-display-name-p", children: proposal.proposer.username || "Creator.io" }), _jsx("p", { className: "paragraph-2r", children: proposal.proposer.fullName || "Kadine James" })] })] })] }) });
};
//# sourceMappingURL=UI-Elements.js.map