import { jsx as _jsx } from "react/jsx-runtime";
import { Skeleton } from '@gravity-ui/uikit';
import { cn } from "../../../../classname.js";
import { ReactWidgetDescriptor } from "../../../behavior/WidgetDecoration/index.js";
import "./skeleton.css";
const b = cn('image-skeleton');
export class ImageSkeletonDescriptor extends ReactWidgetDescriptor {
    #domElem;
    get pos() {
        return this.getPos?.() ?? this.initPos;
    }
    constructor(initPos, size) {
        super(initPos, 'image_skeleton');
        this.#domElem = document.createElement('span');
        this.#domElem.classList.add(b());
        if (size) {
            this.#domElem.style.setProperty('--img-skeleton-width', size.width);
            this.#domElem.style.setProperty('--img-skeleton-height', size.height);
        }
    }
    getDomElem() {
        return this.#domElem;
    }
    renderReactElement() {
        return _jsx(Skeleton, { className: b('skeleton') });
    }
}
//# sourceMappingURL=skeleton.js.map
