import prefix from '../global/prefix';
import Popup from './Popup';
import isNull from '../utils/isNull';
import config from '../global/config';
class Tooltip extends Popup {
    constructor(elem, options = {}, initial = config.initial) {
        isNull(options.size) ? options.size = 'sm' : null;
        options?.tools === true ? options.tools = { enable: true, placement: 'outside' } : !options?.tools ? options.tools = { enable: false, placement: 'outside' } : null;
        !options?.placement ? options.placement = 'top' : null;
        !options?.footer ? options.footer = false : null;
        !options?.padding ? options.padding = false : null;
        !options?.theme ? options.theme = 'text' : null;
        super(elem, options, initial);
        this.on('init', () => {
            this.mainEl.classList.add(`${prefix}tooltip`);
        });
    }
}
export default Tooltip;
