"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShareUICard = exports.ShareUIList = exports.ShareUIBase = void 0;
const react_1 = __importDefault(require("react"));
const Styled = __importStar(require("./index.styled"));
const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
const Buttons_1 = require("./Buttons");
const ShareUIBase = ({ title, description, textToCopy }) => {
    const handleClickKaKaoButton = () => {
        console.log('TODO: 카카오 공유하기');
    };
    const handleClickLinkButton = () => {
        (0, copy_to_clipboard_1.default)(textToCopy);
    };
    return (react_1.default.createElement(react_1.default.Fragment, null,
        react_1.default.createElement(Styled.TitleWrapper, null,
            description && react_1.default.createElement(Styled.SubTitle, null, description),
            react_1.default.createElement(Styled.Title, null, title)),
        react_1.default.createElement(Styled.IconWrapper, null,
            react_1.default.createElement(Buttons_1.KakaoButton, { handleClickButton: handleClickKaKaoButton }),
            react_1.default.createElement(Buttons_1.ShareButton, { handleClickButton: handleClickLinkButton }))));
};
exports.ShareUIBase = ShareUIBase;
const ShareUIList = (props) => {
    return (react_1.default.createElement(Styled.ListContainer, null,
        react_1.default.createElement(ShareUIBase, Object.assign({}, props))));
};
exports.ShareUIList = ShareUIList;
const ShareUICard = (props) => {
    return (react_1.default.createElement(Styled.CardContainer, { background: props.background },
        react_1.default.createElement(ShareUIBase, Object.assign({}, props))));
};
exports.ShareUICard = ShareUICard;
