/*
   SPDX-FileCopyrightText: 2026 Laurent Montel <montel@kde.org>

   SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "timestampinmessagesdialog.h"
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QPushButton>
#include <QVBoxLayout>
using namespace Qt::Literals::StringLiterals;
TimeStampInMessagesDialog::TimeStampInMessagesDialog(QWidget *parent)
    : QDialog(parent)
    , mTimeStampInMessagesWidget(new TimeStampInMessagesWidget(this))
{
    setWindowTitle(i18nc("@title:window", "Add TimeStamp"));

    auto mainLayout = new QVBoxLayout(this);
    mainLayout->setObjectName(u"mainLayout"_s);

    mTimeStampInMessagesWidget->setObjectName(u"mTimeStampInMessagesWidget"_s);
    mainLayout->addWidget(mTimeStampInMessagesWidget);

    auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
    buttonBox->setObjectName(u"buttonBox"_s);
    mainLayout->addWidget(buttonBox);
    connect(buttonBox, &QDialogButtonBox::rejected, this, &TimeStampInMessagesDialog::reject);
    connect(buttonBox, &QDialogButtonBox::accepted, this, &TimeStampInMessagesDialog::accept);
}

TimeStampInMessagesDialog::~TimeStampInMessagesDialog() = default;

TimeStampInMessagesUtils::TimeStampInfo TimeStampInMessagesDialog::timeStampInfo() const
{
    return mTimeStampInMessagesWidget->timeStampInfo();
}

#include "moc_timestampinmessagesdialog.cpp"
