//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "NSTextElement")]
    pub struct NSTextListElement;

    #[cfg(feature = "NSTextElement")]
    unsafe impl ClassType for NSTextListElement {
        #[inherits(NSTextElement, NSObject)]
        type Super = NSTextParagraph;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "NSTextElement")]
unsafe impl NSObjectProtocol for NSTextListElement {}

extern_methods!(
    #[cfg(feature = "NSTextElement")]
    unsafe impl NSTextListElement {
        #[cfg(feature = "NSTextList")]
        #[method_id(@__retain_semantics Init initWithParentElement:textList:contents:markerAttributes:childElements:)]
        pub unsafe fn initWithParentElement_textList_contents_markerAttributes_childElements(
            this: Allocated<Self>,
            parent: Option<&NSTextListElement>,
            text_list: &NSTextList,
            contents: Option<&NSAttributedString>,
            marker_attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
            children: Option<&NSArray<NSTextListElement>>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithAttributedString:)]
        pub unsafe fn initWithAttributedString(
            this: Allocated<Self>,
            attributed_string: Option<&NSAttributedString>,
        ) -> Retained<Self>;

        #[cfg(feature = "NSTextList")]
        #[method_id(@__retain_semantics Other textListElementWithContents:markerAttributes:textList:childElements:)]
        pub unsafe fn textListElementWithContents_markerAttributes_textList_childElements(
            contents: &NSAttributedString,
            marker_attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
            text_list: &NSTextList,
            children: Option<&NSArray<NSTextListElement>>,
        ) -> Retained<Self>;

        #[cfg(feature = "NSTextList")]
        #[method_id(@__retain_semantics Other textListElementWithChildElements:textList:nestingLevel:)]
        pub unsafe fn textListElementWithChildElements_textList_nestingLevel(
            children: &NSArray<NSTextListElement>,
            text_list: &NSTextList,
            nesting_level: NSInteger,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "NSTextList")]
        #[method_id(@__retain_semantics Other textList)]
        pub unsafe fn textList(&self) -> Retained<NSTextList>;

        #[method_id(@__retain_semantics Other contents)]
        pub unsafe fn contents(&self) -> Option<Retained<NSAttributedString>>;

        #[method_id(@__retain_semantics Other markerAttributes)]
        pub unsafe fn markerAttributes(
            &self,
        ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>;

        #[method_id(@__retain_semantics Other attributedString)]
        pub unsafe fn attributedString(&self) -> Retained<NSAttributedString>;

        #[method_id(@__retain_semantics Other childElements)]
        pub unsafe fn childElements(&self) -> Retained<NSArray<NSTextListElement>>;

        #[method_id(@__retain_semantics Other parentElement)]
        pub unsafe fn parentElement(&self) -> Option<Retained<NSTextListElement>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSTextElement`
    #[cfg(feature = "NSTextElement")]
    unsafe impl NSTextListElement {
        #[cfg(feature = "NSTextContentManager")]
        #[method_id(@__retain_semantics Init initWithTextContentManager:)]
        pub unsafe fn initWithTextContentManager(
            this: Allocated<Self>,
            text_content_manager: Option<&NSTextContentManager>,
        ) -> Retained<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "NSTextElement")]
    unsafe impl NSTextListElement {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);
