// WARNING: Please don't edit this file. It was generated by Python/WinRT v0.0.0

#pragma once

#include "pybase.h"
static_assert(winrt::check_version(PYWINRT_VERSION, "0.0.0"), "Mismatched Py/WinRT headers.");
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.UI.h>

#include <winrt/Windows.UI.WebUI.Core.h>

namespace py::proj::Windows::UI::WebUI::Core
{
}

namespace py
{
    template<>
    inline constexpr const char* buffer_format<winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode> = "i";


    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core.WebUICommandBarClosedDisplayMode";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "WebUICommandBarClosedDisplayMode";
    };

    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::WebUICommandBar>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core.WebUICommandBar";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "WebUICommandBar";
    };

    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core.WebUICommandBarBitmapIcon";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "WebUICommandBarBitmapIcon";
    };

    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core.WebUICommandBarConfirmationButton";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "WebUICommandBarConfirmationButton";
    };

    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarIconButton>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core.WebUICommandBarIconButton";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "WebUICommandBarIconButton";
    };

    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core.WebUICommandBarItemInvokedEventArgs";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "WebUICommandBarItemInvokedEventArgs";
    };

    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core.WebUICommandBarSizeChangedEventArgs";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "WebUICommandBarSizeChangedEventArgs";
    };

    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core.WebUICommandBarSymbolIcon";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "WebUICommandBarSymbolIcon";
    };

    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::IWebUICommandBarElement>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core._IWebUICommandBarElement";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "_IWebUICommandBarElement";
    };

    template<>
    struct py_type<winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon>
    {
        static constexpr std::string_view qualified_name = "winrt.windows.ui.webui.core._IWebUICommandBarIcon";
        static constexpr const char* module_name = "winrt.windows.ui.webui.core";
        static constexpr const char* type_name = "_IWebUICommandBarIcon";
    };
}

#if __has_include("py.Windows.Foundation.h")
#include "py.Windows.Foundation.h"
#endif

#if __has_include("py.Windows.Foundation.Collections.h")
#include "py.Windows.Foundation.Collections.h"
#endif

#if __has_include("py.Windows.UI.h")
#include "py.Windows.UI.h"
#endif

namespace py::impl::Windows::UI::WebUI::Core
{
    struct MenuClosedEventHandler
    {
        static winrt::Windows::UI::WebUI::Core::MenuClosedEventHandler get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)]()
            {
                auto gil = py::ensure_gil();

                try
                {
                    py::pyobj_handle return_value{PyObject_CallNoArgs(delegate.callable())};
                    if (!return_value)
                    {
                        throw python_exception();
                    }
                }
                catch (python_exception)
                {
                    py::write_unraisable_and_throw();
                }
            };
        };
    };

    struct MenuOpenedEventHandler
    {
        static winrt::Windows::UI::WebUI::Core::MenuOpenedEventHandler get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)]()
            {
                auto gil = py::ensure_gil();

                try
                {
                    py::pyobj_handle return_value{PyObject_CallNoArgs(delegate.callable())};
                    if (!return_value)
                    {
                        throw python_exception();
                    }
                }
                catch (python_exception)
                {
                    py::write_unraisable_and_throw();
                }
            };
        };
    };

    struct SizeChangedEventHandler
    {
        static winrt::Windows::UI::WebUI::Core::SizeChangedEventHandler get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)](winrt::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs const& param0)
            {
                auto gil = py::ensure_gil();

                try
                {
                    py::pyobj_handle py_param0{py::convert(param0)};
                    if (!py_param0)
                    {
                        throw python_exception();
                    }

                    py::pyobj_handle return_value{PyObject_CallOneArg(delegate.callable(), py_param0.get())};
                    if (!return_value)
                    {
                        throw python_exception();
                    }
                }
                catch (python_exception)
                {
                    py::write_unraisable_and_throw();
                }
            };
        };
    };
}

namespace py::wrapper::Windows::UI::WebUI::Core
{
    using WebUICommandBar = py::winrt_wrapper<winrt::Windows::UI::WebUI::Core::WebUICommandBar>;
    using WebUICommandBarBitmapIcon = py::winrt_wrapper<winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon>;
    using WebUICommandBarConfirmationButton = py::winrt_wrapper<winrt::Windows::UI::WebUI::Core::WebUICommandBarConfirmationButton>;
    using WebUICommandBarIconButton = py::winrt_wrapper<winrt::Windows::UI::WebUI::Core::WebUICommandBarIconButton>;
    using WebUICommandBarItemInvokedEventArgs = py::winrt_wrapper<winrt::Windows::UI::WebUI::Core::WebUICommandBarItemInvokedEventArgs>;
    using WebUICommandBarSizeChangedEventArgs = py::winrt_wrapper<winrt::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs>;
    using WebUICommandBarSymbolIcon = py::winrt_wrapper<winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon>;
    using IWebUICommandBarElement = py::winrt_wrapper<winrt::Windows::UI::WebUI::Core::IWebUICommandBarElement>;
    using IWebUICommandBarIcon = py::winrt_wrapper<winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon>;
}

namespace py
{
    template <>
    struct delegate_python_type<winrt::Windows::UI::WebUI::Core::MenuClosedEventHandler>
    {
        using type = py::impl::Windows::UI::WebUI::Core::MenuClosedEventHandler;
    };

    template <>
    struct delegate_python_type<winrt::Windows::UI::WebUI::Core::MenuOpenedEventHandler>
    {
        using type = py::impl::Windows::UI::WebUI::Core::MenuOpenedEventHandler;
    };

    template <>
    struct delegate_python_type<winrt::Windows::UI::WebUI::Core::SizeChangedEventHandler>
    {
        using type = py::impl::Windows::UI::WebUI::Core::SizeChangedEventHandler;
    };

}
