// components/Widget.ts
import { createElement } from '../utils/utils';

export abstract class Widget {
    protected container: HTMLElement;
    protected sizeType: 'default' | 'icon';

    constructor(sizeType: 'default' | 'icon' = 'default') {
        this.container = createElement('div');
        this.container.classList.add('widget');
        this.sizeType = sizeType;
        if (sizeType === 'icon') {
            this.container.classList.add('icon-widget');
        }
    }

    abstract render(): HTMLElement;

    getSizeType(): 'default' | 'icon' {
        return this.sizeType;
    }

    getContainer(): HTMLElement {
        return this.container;
    }
}