'use client'

import React, { useState } from 'react';

import { IoSettingsOutline } from 'react-icons/io5';

import Icon from '../Icon';
import Modal from './Modal';

interface Props {
    labels: any
}

const Settings: React.FC<Props> = (props) => {

    const { labels } = props

    const [showModal, setShowModal] = useState<boolean>(false)

    return (
        <>
            <Icon handleClick={() => setShowModal(true)}>
                {<IoSettingsOutline size={24} />}
            </Icon>

            {showModal && <Modal handleClose={() => setShowModal(false)} labels={labels} />}
        </>
    );
};

export default Settings;