//! 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::*;
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
use objc2_quartz_core::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicollectionviewlistcell?language=objc)
    #[unsafe(super(
        UICollectionViewCell,
        UICollectionReusableView,
        UIView,
        UIResponder,
        NSObject
    ))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(
        feature = "UICollectionViewCell",
        feature = "UIResponder",
        feature = "UIView"
    ))]
    pub struct UICollectionViewListCell;
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView",
    feature = "objc2-quartz-core"
))]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
    unsafe impl CALayerDelegate for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl NSCoding for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl NSObjectProtocol for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UIAppearance",
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl UIAppearance for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UIAppearance",
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl UIAppearanceContainer for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl UICoordinateSpace for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIDynamicBehavior",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl UIDynamicItem for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIFocus",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl UIFocusEnvironment for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIFocus",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl UIFocusItem for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIFocus",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl UIFocusItemContainer for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl UIResponderStandardEditActions for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UITraitCollection",
    feature = "UIView"
))]
extern_conformance!(
    unsafe impl UITraitEnvironment for UICollectionViewListCell {}
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView"
))]
impl UICollectionViewListCell {
    extern_methods!(
        #[cfg(feature = "UIListContentConfiguration")]
        /// Returns a default list content configuration for the cell's style.
        #[unsafe(method(defaultContentConfiguration))]
        #[unsafe(method_family = none)]
        pub fn defaultContentConfiguration(&self) -> Retained<UIListContentConfiguration>;

        /// Defines the level of indentation for this cell. This is set automatically when using a hierarchical data source.
        #[unsafe(method(indentationLevel))]
        #[unsafe(method_family = none)]
        pub fn indentationLevel(&self) -> NSInteger;

        /// Setter for [`indentationLevel`][Self::indentationLevel].
        #[unsafe(method(setIndentationLevel:))]
        #[unsafe(method_family = none)]
        pub fn setIndentationLevel(&self, indentation_level: NSInteger);

        #[cfg(feature = "objc2-core-foundation")]
        /// The width of an indentation level. The overall indentation will be indentationWidth * indentationLevel.
        #[unsafe(method(indentationWidth))]
        #[unsafe(method_family = none)]
        pub fn indentationWidth(&self) -> CGFloat;

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

        /// Defines whether accessories on the leading side are indented as well. If NO, only the content view will be indented.
        /// Defaults to YES.
        #[unsafe(method(indentsAccessories))]
        #[unsafe(method_family = none)]
        pub fn indentsAccessories(&self) -> bool;

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

        #[cfg(feature = "UICellAccessory")]
        /// All the accessories that should be decorating the cell. The order and whether an accessory is
        /// rendered on the leading or trailing side of the cell is defined by the system.
        #[unsafe(method(accessories))]
        #[unsafe(method_family = none)]
        pub fn accessories(&self) -> Retained<NSArray<UICellAccessory>>;

        #[cfg(feature = "UICellAccessory")]
        /// Setter for [`accessories`][Self::accessories].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setAccessories:))]
        #[unsafe(method_family = none)]
        pub fn setAccessories(&self, accessories: &NSArray<UICellAccessory>);

        #[cfg(feature = "UILayoutGuide")]
        /// When used in a section that supports separators, this guide can be used to adjust the preferred
        /// insets of the separators. To align the separators to your content, add constraints to the leading
        /// or trailing anchors of this layout guide. When a system-provided content configuration is applied
        /// to the cell, the separator will be automatically aligned to the primary text in the content view.
        ///
        /// See: UICollectionLayoutListConfiguration
        #[unsafe(method(separatorLayoutGuide))]
        #[unsafe(method_family = none)]
        pub fn separatorLayoutGuide(&self) -> Retained<UILayoutGuide>;
    );
}

/// Methods declared on superclass `UIView`.
#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView"
))]
impl UICollectionViewListCell {
    extern_methods!(
        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(initWithFrame:))]
        #[unsafe(method_family = init)]
        pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[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 fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

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