//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsgrouptouchbaritem?language=objc)
    #[unsafe(super(NSTouchBarItem, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "NSTouchBarItem")]
    pub struct NSGroupTouchBarItem;
);

#[cfg(feature = "NSTouchBarItem")]
extern_conformance!(
    unsafe impl NSCoding for NSGroupTouchBarItem {}
);

#[cfg(feature = "NSTouchBarItem")]
extern_conformance!(
    unsafe impl NSObjectProtocol for NSGroupTouchBarItem {}
);

#[cfg(feature = "NSTouchBarItem")]
impl NSGroupTouchBarItem {
    extern_methods!(
        #[unsafe(method(groupItemWithIdentifier:items:))]
        #[unsafe(method_family = none)]
        pub unsafe fn groupItemWithIdentifier_items(
            identifier: &NSTouchBarItemIdentifier,
            items: &NSArray<NSTouchBarItem>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(feature = "NSUserInterfaceCompression")]
        #[unsafe(method(groupItemWithIdentifier:items:allowedCompressionOptions:))]
        #[unsafe(method_family = none)]
        pub unsafe fn groupItemWithIdentifier_items_allowedCompressionOptions(
            identifier: &NSTouchBarItemIdentifier,
            items: &NSArray<NSTouchBarItem>,
            allowed_compression_options: &NSUserInterfaceCompressionOptions,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[unsafe(method(alertStyleGroupItemWithIdentifier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn alertStyleGroupItemWithIdentifier(
            identifier: &NSTouchBarItemIdentifier,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(feature = "NSTouchBar")]
        #[unsafe(method(groupTouchBar))]
        #[unsafe(method_family = none)]
        pub unsafe fn groupTouchBar(&self) -> Retained<NSTouchBar>;

        #[cfg(feature = "NSTouchBar")]
        /// Setter for [`groupTouchBar`][Self::groupTouchBar].
        #[unsafe(method(setGroupTouchBar:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setGroupTouchBar(&self, group_touch_bar: &NSTouchBar);

        #[unsafe(method(customizationLabel))]
        #[unsafe(method_family = none)]
        pub unsafe fn customizationLabel(&self) -> Retained<NSString>;

        /// Setter for [`customizationLabel`][Self::customizationLabel].
        #[unsafe(method(setCustomizationLabel:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>);

        #[cfg(feature = "NSUserInterfaceLayout")]
        #[unsafe(method(groupUserInterfaceLayoutDirection))]
        #[unsafe(method_family = none)]
        pub unsafe fn groupUserInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection;

        #[cfg(feature = "NSUserInterfaceLayout")]
        /// Setter for [`groupUserInterfaceLayoutDirection`][Self::groupUserInterfaceLayoutDirection].
        #[unsafe(method(setGroupUserInterfaceLayoutDirection:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setGroupUserInterfaceLayoutDirection(
            &self,
            group_user_interface_layout_direction: NSUserInterfaceLayoutDirection,
        );

        #[unsafe(method(prefersEqualWidths))]
        #[unsafe(method_family = none)]
        pub unsafe fn prefersEqualWidths(&self) -> bool;

        /// Setter for [`prefersEqualWidths`][Self::prefersEqualWidths].
        #[unsafe(method(setPrefersEqualWidths:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPrefersEqualWidths(&self, prefers_equal_widths: bool);

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(preferredItemWidth))]
        #[unsafe(method_family = none)]
        pub unsafe fn preferredItemWidth(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`preferredItemWidth`][Self::preferredItemWidth].
        #[unsafe(method(setPreferredItemWidth:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPreferredItemWidth(&self, preferred_item_width: CGFloat);

        #[cfg(feature = "NSUserInterfaceCompression")]
        #[unsafe(method(effectiveCompressionOptions))]
        #[unsafe(method_family = none)]
        pub unsafe fn effectiveCompressionOptions(
            &self,
        ) -> Retained<NSUserInterfaceCompressionOptions>;

        #[cfg(feature = "NSUserInterfaceCompression")]
        #[unsafe(method(prioritizedCompressionOptions))]
        #[unsafe(method_family = none)]
        pub unsafe fn prioritizedCompressionOptions(
            &self,
        ) -> Retained<NSArray<NSUserInterfaceCompressionOptions>>;

        #[cfg(feature = "NSUserInterfaceCompression")]
        /// Setter for [`prioritizedCompressionOptions`][Self::prioritizedCompressionOptions].
        #[unsafe(method(setPrioritizedCompressionOptions:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPrioritizedCompressionOptions(
            &self,
            prioritized_compression_options: &NSArray<NSUserInterfaceCompressionOptions>,
        );
    );
}

/// Methods declared on superclass `NSTouchBarItem`.
#[cfg(feature = "NSTouchBarItem")]
impl NSGroupTouchBarItem {
    extern_methods!(
        #[unsafe(method(initWithIdentifier:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithIdentifier(
            this: Allocated<Self>,
            identifier: &NSTouchBarItemIdentifier,
        ) -> Retained<Self>;

        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "NSTouchBarItem")]
impl NSGroupTouchBarItem {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
