//////////////////////////////////////////////////////////////////////////////
//
//  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 AMILAYEROBJ_H
#define AMILAYEROBJ_H

#include <AcString.h>

namespace Ami {
  enum LayObjHideType {
    eDontHide     = 0x00,
    eHideBg       = 0x01,
    eHideFg       = 0x02,
    eHideFgBg     = 0x03,
  };
}

//////////////////////////////////////////////////////////////////////////
///<summary>This class represents a ACM layer for the specified standard. 
///The ACM layer is identified via the key, a string value. </summary>
class AmiLayerCfg {
public:
  virtual ~AmiLayerCfg() {}

public:
  ///<summary>layer key read-only property</summary>
  virtual AcString key() const = 0;

  ///<summary>layer name property.</summary>
  virtual bool setName(const ACHAR*) = 0;
  virtual AcString name() const = 0;

  ///<summary>layer description property</summary>
  virtual bool setDesc(const ACHAR*) = 0;
  virtual AcString getDesc() const = 0;

  ///<summary>layer color property</summary>
  virtual bool setTrueColor(const AcCmColor& color) = 0;
  virtual AcCmColor trueColor() const = 0;

  ///<summary>layer line type property(linetype object id)</summary>
  virtual bool setLinetypeId(const AcDbObjectId& objId) = 0;
  virtual AcDbObjectId linetypeId() const = 0;

  ///<summary>layer line type property(linetype name)</summary>
  virtual bool setLinetype(const ACHAR* linetype, AcDbDatabase* pDwg = NULL) = 0;
  virtual AcString linetype() const = 0;

  ///<summary>layer line weight property</summary>
  virtual bool setLineweight(AcDb::LineWeight) = 0;
  virtual AcDb::LineWeight lineweight() const = 0;

  ///<summary>layer "NoPlot" attribute</summary>
  virtual bool setNoPlot(bool) = 0;
  virtual bool noPlot() const  = 0;

  ///<summary>layer "Invisible" attribute</summary>
  virtual bool setInvisible(bool) = 0;
  virtual bool invisible() const  = 0;

  ///<summary>layer "NoReplicateInLayerGroup" attribute</summary>
  virtual bool setNoReplicateInLayerGroup(bool) = 0;
  virtual bool noReplicateInLayerGroup() const = 0;

  ///<summary>layer override color status</summary>
  virtual bool setOverrideColorByLayerGroup(bool) = 0;
  virtual bool overrideColorByLayerGroup() const = 0;

  ///<summary>get the key of ESK objects mapped to this layer object.</summary>
  virtual bool getAssocObjects(AcArray<AcString>& arObjKeys) = 0;
};

//////////////////////////////////////////////////////////////////////////
class AmiLayObjCfg {
public:
  virtual ~AmiLayObjCfg() {}

public:
  ///<summary>layer object key(read-only)</summary>
  virtual AcString objectKey() const = 0;

  ///<summary>Layer name </summary>
  virtual bool setLayerName(const ACHAR*) = 0;
  virtual AcString layerName() const = 0;

  ///<summary>Layer object color</summary>
  virtual bool setTrueColor(const AcCmColor& color) = 0;
  virtual AcCmColor trueColor() const = 0;

  ///<summary>Layer object line type id</summary>
  virtual bool setLinetypeId(const AcDbObjectId& objId) = 0;
  virtual AcDbObjectId linetypeId() const = 0;

  ///<summary>Layer object line type name</summary>
  virtual bool setLinetype(const ACHAR* linetype, AcDbDatabase* pDwg = NULL) = 0;
  virtual AcString linetype() const = 0;

  ///<summary>Layer object line weight</summary>
  virtual bool setLineweight(AcDb::LineWeight) = 0;
  virtual AcDb::LineWeight lineweight() const = 0;

  ///<summary>Layer object hide type</summary>
  virtual bool setHide(Ami::LayObjHideType) = 0;
  virtual Ami::LayObjHideType hide() const = 0;
};

#endif AMILAYEROBJ_H