#pragma once

#include "xtr/ui/BuffRichEdit.h"

namespace xtr::dialog {

//! Dialog: Edit comment
class EditComment : public CDialog {
public:
  CString comment;

private:
  CString title;
  ui::BuffRichEdit textControl;

public:
  EditComment(CString comment, CString title, CWnd* pParent = nullptr);

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

//! Dialog: Edit abstract text field
class EditString : public CDialog {
public:
  CString resultStr;

private:
  CString m_Caption;

public:
  explicit EditString(CString initData, CString caption = {}, CWnd* pParent = nullptr);

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

//! Dialog: Edit hyperlink
class EditHyperlink : public CDialog {
public:
  CString address;
  CString subAddr;

public:
  explicit EditHyperlink(const ccl::oss::MediaLink& lnk, CWnd* pParent = nullptr);

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

DECLARE_MESSAGE_MAP()
  afx_msg void OnBrowse();
};

} // namespace xtr::dialog