import { COOKIE_WINDOW_SELECTED as n } from "./helper.js";
import { setCookie as t, deleteCookie as h } from "../../../../../helpers/cookies/cookies.js";
function a(o, d, e, c = !0) {
  const r = o.hashAreas[d], i = c && o.loadCookiesFromNetwork;
  r.currentLayoutId = e, e !== "" && o.hashWindows[e] ? (o.currentModuleId = o.hashWindows[e].moduleId, i && t({
    networkOperation: o.networkOperation,
    endPoint: `${r.id}/${n}`,
    value: { currentLayoutId: e }
  }).catch(() => {
  })) : (o.currentModuleId = "", i && h({
    networkOperation: o.networkOperation,
    data: { f: [{ n: "id", o: "e", o1: n }] }
  }).catch(() => {
  }));
}
export {
  a as helperSelectLayout
};
