#pragma once

namespace xtr::dialog {

//! Dialog: Rename constituent
class CstRename final : public CDialog {
public:
  EntityUID target;
  CString oldName;
  CString newName{ oldName };
  BOOL doUpdateExpr{ TRUE };

private:
  const ccl::semantic::RSCore& core;
  CComboBox nameCtrl;

public:
  CstRename(const ccl::semantic::RSCore& core, EntityUID target, CWnd* pParent = nullptr);

private:
  void DoDataExchange(CDataExchange* pDX) override;
  BOOL OnInitDialog() override;

DECLARE_MESSAGE_MAP()
  afx_msg void OnCbnSelchangeNameCb();

private:
  void InitCstNameList();
};

} // namespace xtr::dialog