
// src/state.js
export const state = {
  URI: null,
  USER: null,
  PASSW: null,

  appsData: [],
  appsOrder: [],

  editMode: false,              // wiggle mode
  zoomLevel: 1,
  zoomMax: 4,
  initialPinchDistance: null,

  // Long‑press / drag / context
  longPressTimer: null,
  longPressTarget: null,
  justEnteredEditMode: false,
  contextMenuTargetId: null,

  draggingIcon: null,
  draggingId: null,
  dragOffsetX: 0,
  dragOffsetY: 0,
  dragStartX: 0,
  dragStartY: 0,
  placeholderEl: null,
};

export function setConfig({ url, user, password }) {
  state.URI = url; state.USER = user; state.PASSW = password;
}
