//@ts-nocheck
import GetMaxTextObjectSize from 'src/apps/kanbans/GetMaxTextObjectSize';
import { EndlessCanvas } from 'src/types/kanban_types';
import { LocalStorage } from 'quasar';

export default function (scene: EndlessCanvas) {
  if (LocalStorage.has('debug') && scene.debugTable) {
    const pointer0 = scene.input.manager.pointers[0];

    const stringArray = [
      pointer0.worldX.toFixed(0) + 'x' + pointer0.worldY.toFixed(0),
      pointer0.x + 'x' + pointer0.y,
      'button:' + pointer0.button,
    ];
    const maxSize = GetMaxTextObjectSize(scene, stringArray);

    scene.debugTable.setText(stringArray.join('\n'));
    scene.debugTable.setPosition(
      scene.uiCamera.width - maxSize.width,
      scene.uiCamera.height - maxSize.height * stringArray.length,
    );
  }
}
