import { VunelivBase } from "../vunelix-base.js";

import { TechnicalAnalysis } from "../../pages/symbol-detail/technicals.js";

export class VunelivTechnicalBase extends VunelivBase {
    static widgetCss=[ "pages/technicals" ];
    static langFile="symbol-detail";
    static langStoreKey="symbol_detail";
    static useSocket=false;
    static branding_bar=true;
    getSkeletonHtml() {
        return `<div style="padding:20px"><div class="skeleton skeleton-box" style="height:300px;border-radius:12px"></div></div>`;
    }
    onReady(root, config) {
        new TechnicalAnalysis({
            rootNode: root,
            symbol: config.symbol || "BTCUSD",
            exchange: config.exchange || "BINANCE",
            period: config.defaultPeriod || "1D",
            autoFetch: true,
            enableTableValue: config.enableTableValue !== false,
            enableTableScore: config.enableTableScore !== false,
            enableTableAction: config.enableTableAction !== false,
            enableTimeframeIcons: !!root.querySelector(".control-icon")
        });
    }
}