#pragma once

#include "xtr/ui/ElementShell.h"

namespace xtr::dialog {

//! Dialog: New document
class NewDocument final : public CDialog {
public:
  NewDocument();

DECLARE_MESSAGE_MAP()
  afx_msg void OnOSS();
  afx_msg void OnRSModel();
  afx_msg void OnRSForm();
};

//! Dialog: New RSForm or RSModel
class NewRSForm final : public CDialog {
public:
  CString newTitle;
  CString newAlias;

private:
  CString title;

  ui::CstPicker aliasCB;
  ui::CstPicker titleCB;

public:
  explicit NewRSForm(CString title, CWnd* pParent = nullptr);

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

DECLARE_MESSAGE_MAP()
  afx_msg void OnChange();

  void DDV_Names();
};

//! Dialog: New OSS
class NewOSS final : public CDialog {
public:
  CString ossName;
  CString fullPath;

private:
  BOOL pathModified{ TRUE };

public:
  explicit NewOSS(CWnd* pParent = nullptr);

protected:
  void DoDataExchange(CDataExchange* pDX) override;

DECLARE_MESSAGE_MAP()
  afx_msg void OnBrowse();
  afx_msg void OnAccept();
  afx_msg void OnChangeOssName();
  afx_msg void OnChangeOssPath();
  afx_msg void OnBnClickedCancel();

private:
  void ShowBrowseDlg();
};

} // namespace xtr::dialog