import { SHJDatasourceV2 as n } from "../../datasource/index.mjs";
import { DataSourceUtils as s } from "../../datasource/utils/utils.mjs";
const k = (e, m) => {
  const r = s.getVariableByName(e.name);
  if (r) {
    if (e.refreshLinkComponents ?? (e.refreshLinkComponents = !0), e.dataType === "params") {
      s.setVariableById(
        r,
        m,
        e.refreshLinkComponents
      );
      return;
    }
    n.parse({
      sources: [e.useDataSource],
      noUseMapping: !0,
      isInterval: !1,
      callback: (o) => {
        s.setVariableById(
          r,
          o,
          e.refreshLinkComponents
        );
      }
    });
  }
};
export {
  k as executeUpdateVariableAction
};
