import React, { Component } from 'react';
import WDWidgetBase from "@widgets/WDWidgetBase/WDWidgetBase";
import PGTemplateList from "./maps/PGTemplateList/PGTemplateList";
import "./DefaultApp.css";
import IWDWidgetBaseState from "@widgets/WDWidgetBase/IWDWidgetBaseState";
import EventObject from "@widgets/WDWidgetBase/EventObject";

// Anywhere in your TypeScript code (e.g., at the top of your component file)
// declare global {
//   interface Window {
//     DEBUG_MODE: boolean;
//   }
// }
// // Now you can safely use the property
// window.DEBUG_MODE = true;

export default class DefaultApp extends WDWidgetBase<{}, IWDWidgetBaseState>{
  
  constructor(props: any) {
    super(props);
    this.receiveEvents = true;
  }

  private myHeader_Logout(data: EventObject) : boolean {
    alert('Arrivato evento di LogOut');
    return false;
  }

  private myLista_rowClick(data: EventObject) {
    alert(data);
  }

  renderContent() {
      return (
        <PGTemplateList />
      );
  }

}