import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import { Button, Input } from "antd";
import { ContentLayout } from "../../../../Components/ContentLayout";
import { NewcoinRecept } from "../../../../Components/Recepts";
import { ProgressButton } from "../../../../Components/ProgressButton";
import { useActions, useAppState } from "../../../../overmind";
import { useForm } from "antd/lib/form/Form";
import { useState } from "react";
import Form from "antd/lib/form";
const DaoCreate = () => {
    const [form] = useForm();
    const actions = useActions();
    const state = useAppState();
    const [tx, setTx] = useState("");
    return (_jsxs(ContentLayout, { children: [_jsxs("p", { className: "super-size font-variant-none", style: { marginBottom: "40px" }, children: [" ", "Create your own DAO"] }), _jsxs(Form, { name: "new-proposal-form", form: form, onFinish: (v) => actions.newcoin.daoCreate(v).then(({ TxID_createDao }) => setTx(TxID_createDao)), wrapperCol: { span: 24 }, autoComplete: "off", children: [_jsx("div", { style: { marginBottom: 20 }, children: "Describe your dao. The description is stored onchain and cannot be changed." }), _jsx(Form.Item, { name: "descr", children: _jsx(Input.TextArea, {}) }), _jsx(Form.Item, { wrapperCol: { offset: 8, span: 16 }, children: _jsx(ProgressButton, { actionName: "api.newcoin.daoCreate", type: "primary", htmlType: "submit", progressText: "Creating your dao", children: "Create DAO" }) })] }), _jsxs(NewcoinRecept, { onDone: () => actions.routing.historyPush({ location: "/dao/" + state.api.auth.user?.username }), tx: tx, visible: !!tx, children: [_jsx("p", { children: "Congratulations, your own DAO is live!" }), _jsx("br", {}), _jsx("p", { children: "Start by creating a whitelist proposal for the first person you would like to participate in DAO decisions." }), _jsx("p", { className: "nl-vertical-space-self", children: "Are they still not on Newlife? Click below to invite them!" }), _jsx("p", { className: "text-center nl-vertical-space-self", children: _jsx(Button, { onClick: () => actions.routing.historyPush({ location: "/user/invite" }), className: "stroke-btn-green", children: "Invite a friend" }) })] })] }));
};
export default DaoCreate;
//# sourceMappingURL=DaoCreate.js.map