//////////////////////////////////////////////////////////////////////////////
//
//  Copyright 2025 Autodesk, Inc.  All rights reserved.
//
//  Use of this software is subject to the terms of the Autodesk license 
//  agreement provided at the time of installation or download, or which 
//  otherwise accompanies this software in either electronic or hard copy form.   
//
//////////////////////////////////////////////////////////////////////////////

#ifndef __WATCHER__H
#define __WATCHER__H

class AmdtWatcher : public AcmBomReactor
{
public:

  virtual void onNewBOMTable(const AcDbObjectId &newTableId, const AcDbObjectId &compId);
  virtual void onRenameBOMTable(const AcDbObjectId &tableId, const LPCTSTR newName);
  virtual void onEraseBOMTable(const AcDbObjectId &tableId, const AcDbObjectId &compId);

  virtual void onNewPartList(const AcDbObjectId &partList, const AcDbObjectId &bomId);
  virtual void onRenamePartList(const AcDbObjectId &partListId,const LPCTSTR &newname);
  virtual void onErasePartList(const AcDbObjectId &partListId, const AcDbObjectId &bomId);

	///////////////////////////////////////////////////////////////////////////
	//	MRP Management methods:
	///////////////////////////////////////////////////////////////////////////
  //partlist update???
  //
  virtual void aboutToUpdatePartList(const AcDbObjectId& partListId);
  //entry operations
  //
  virtual void entryCreated(const AcDbObjectId& entryId);
  virtual void entryModified(const AcDbObjectId& entryid);
  virtual void aboutToModifyEntry(const AcDbObjectId& entryId,LPCTSTR tag,LPCTSTR value);
  virtual void entryEdit(const AcDbObjectId& entryId,CMapStringToString& dataMapList);
  //item operations
  //
  virtual void itemCreated(const AcDbObjectId& itemId);
  virtual void itemModified(const AcDbObjectId& itemId);
  virtual void aboutToModifyItem(const AcDbObjectId& itemId,LPCTSTR tag,LPCTSTR value);
  //part dlg operations
  //
  virtual void onPartDlgStarted(const AcDbObjectId& entryId);
  virtual void onPartDlgCanceled(const AcDbObjectId& entryId);
  virtual void onPartDlgFinished(const AcDbObjectId& entryId);
  //bom dlg operations
  //
  virtual void onBomDlgStarted(const AcDbObjectId& bomId);
  virtual void onBomDlgCanceled(const AcDbObjectId& bomId);
  virtual void onBomDlgFinished(const AcDbObjectId& bomId);
  virtual void onBomDlgBomIdChanged(const AcDbObjectId& newBomId);
  //partlist dlg operations
  //
  virtual void onPartListDlgStarted(const AcDbObjectId& partListId);
  virtual void onPartListDlgCanceled(const AcDbObjectId& partListId);
  virtual void onPartListDlgFinished(const AcDbObjectId& partListId);
  //balloon dlg operations
  //
  virtual void onBalloonDlgStarted(const AcDbObjectId& balloonId);
  virtual void onBalloonDlgCanceled(const AcDbObjectId& balloonId);
  virtual void onBalloonDlgFinished(const AcDbObjectId& balloonId);

private:
  void printId( LPCTSTR label, const AcDbObjectId& balloonId) const;
};

#endif