import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useState } from 'react';
import { GetSvgIcon } from '..';
import RadioButton from '../RadioButton';
import './style.scss';
const AIDetailsCard = ({ title = 'Title', content = 'Content', refresh = false, likeState, unlikeState, refreshState }) => {
    const [islike, setIslike] = useState(false);
    const [isunlike, setIsunlike] = useState(false);
    const [isrefresh, setIsrefresh] = useState(refresh);
    const handleLike = () => {
        setIslike((prev) => !prev);
        likeState(!islike);
    };
    const handleUnLike = () => {
        setIsunlike((prev) => !prev);
        unlikeState(!isunlike);
    };
    const handleRefresh = () => {
        setIsrefresh((prev) => !prev);
        refreshState(!isrefresh);
    };
    return (_jsxs("div", { className: 'main-card-div--ad', children: [_jsxs("div", { className: 'card-title-bar', children: [_jsxs("div", { className: 'start-div', children: [_jsx(RadioButton, { value: (val) => console.log(val) }), _jsxs("div", { className: 'sub', children: [" ", title, " "] })] }), _jsxs("div", { className: 'end-div', children: [_jsx("span", { className: `__svg ${islike && '__svg-active'}`, onClick: handleLike, children: _jsx(GetSvgIcon, { iconType: 'like', iconSize: '24' }) }), _jsx("span", { className: `__svg ${isunlike && '__svg-active'}`, onClick: handleUnLike, children: _jsx(GetSvgIcon, { iconType: 'unlike', iconSize: '24' }) }), _jsx("span", { className: `__svg ${isrefresh && '__svg-active'}`, onClick: handleRefresh, style: { width: '24px', marginTop: '6px' }, children: _jsx(GetSvgIcon, { iconType: 'refresh', iconSize: '16' }) })] })] }), _jsx("div", { className: "content", children: content })] }));
};
export default AIDetailsCard;
