// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once #include #include namespace app::notes { class NoteEditWindowContract { public: class View { public: virtual ~View() noexcept = default; virtual bool isNoteEmpty() const noexcept = 0; }; class Presenter : public BasePresenter { public: virtual ~Presenter() noexcept = default; virtual void onNoteChanged() = 0; virtual void save(std::shared_ptr ¬e) = 0; }; }; class NoteEditWindowPresenter : public NoteEditWindowContract::Presenter { public: explicit NoteEditWindowPresenter(std::unique_ptr &¬esRepository); void onNoteChanged() override; void save(std::shared_ptr ¬e) override; private: std::unique_ptr notesRepository; bool noteChanged = false; }; } // namespace app::notes