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

ns_enum!(
    #[underlying(NSInteger)]
    pub enum CLSContextType {
        CLSContextTypeNone = 0,
        CLSContextTypeApp = 1,
        CLSContextTypeChapter = 2,
        CLSContextTypeSection = 3,
        CLSContextTypeLevel = 4,
        CLSContextTypePage = 5,
        CLSContextTypeTask = 6,
        CLSContextTypeChallenge = 7,
        CLSContextTypeQuiz = 8,
        CLSContextTypeExercise = 9,
        CLSContextTypeLesson = 10,
        CLSContextTypeBook = 11,
        CLSContextTypeGame = 12,
        CLSContextTypeDocument = 13,
        CLSContextTypeAudio = 14,
        CLSContextTypeVideo = 15,
        CLSContextTypeCourse = 16,
        CLSContextTypeCustom = 17,
    }
);

typed_enum!(
    pub type CLSContextTopic = NSString;
);

extern_static!(CLSContextTopicMath: &'static CLSContextTopic);

extern_static!(CLSContextTopicScience: &'static CLSContextTopic);

extern_static!(CLSContextTopicLiteracyAndWriting: &'static CLSContextTopic);

extern_static!(CLSContextTopicWorldLanguage: &'static CLSContextTopic);

extern_static!(CLSContextTopicSocialScience: &'static CLSContextTopic);

extern_static!(CLSContextTopicComputerScienceAndEngineering: &'static CLSContextTopic);

extern_static!(CLSContextTopicArtsAndMusic: &'static CLSContextTopic);

extern_static!(CLSContextTopicHealthAndFitness: &'static CLSContextTopic);

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

    #[cfg(feature = "ClassKit_CLSContext")]
    unsafe impl ClassType for CLSContext {
        #[inherits(NSObject)]
        type Super = CLSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "ClassKit_CLSContext")]
unsafe impl NSCoding for CLSContext {}

#[cfg(feature = "ClassKit_CLSContext")]
unsafe impl NSObjectProtocol for CLSContext {}

#[cfg(feature = "ClassKit_CLSContext")]
unsafe impl NSSecureCoding for CLSContext {}

extern_methods!(
    #[cfg(feature = "ClassKit_CLSContext")]
    unsafe impl CLSContext {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
        #[method_id(@__retain_semantics Other identifierPath)]
        pub unsafe fn identifierPath(&self) -> Id<NSArray<NSString>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other identifier)]
        pub unsafe fn identifier(&self) -> Id<NSString>;

        #[cfg(feature = "Foundation_NSURL")]
        #[method_id(@__retain_semantics Other universalLinkURL)]
        pub unsafe fn universalLinkURL(&self) -> Option<Id<NSURL>>;

        #[cfg(feature = "Foundation_NSURL")]
        #[method(setUniversalLinkURL:)]
        pub unsafe fn setUniversalLinkURL(&self, universal_link_url: Option<&NSURL>);

        #[method(type)]
        pub unsafe fn r#type(&self) -> CLSContextType;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other customTypeName)]
        pub unsafe fn customTypeName(&self) -> Option<Id<NSString>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setCustomTypeName:)]
        pub unsafe fn setCustomTypeName(&self, custom_type_name: Option<&NSString>);

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other title)]
        pub unsafe fn title(&self) -> Id<NSString>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setTitle:)]
        pub unsafe fn setTitle(&self, title: &NSString);

        #[method(displayOrder)]
        pub unsafe fn displayOrder(&self) -> NSInteger;

        #[method(setDisplayOrder:)]
        pub unsafe fn setDisplayOrder(&self, display_order: NSInteger);

        #[method_id(@__retain_semantics Other topic)]
        pub unsafe fn topic(&self) -> Option<Id<CLSContextTopic>>;

        #[method(setTopic:)]
        pub unsafe fn setTopic(&self, topic: Option<&CLSContextTopic>);

        #[method(isAssignable)]
        pub unsafe fn isAssignable(&self) -> bool;

        #[method(setAssignable:)]
        pub unsafe fn setAssignable(&self, assignable: bool);

        #[method(suggestedAge)]
        pub unsafe fn suggestedAge(&self) -> NSRange;

        #[method(setSuggestedAge:)]
        pub unsafe fn setSuggestedAge(&self, suggested_age: NSRange);

        #[method(suggestedCompletionTime)]
        pub unsafe fn suggestedCompletionTime(&self) -> NSRange;

        #[method(setSuggestedCompletionTime:)]
        pub unsafe fn setSuggestedCompletionTime(&self, suggested_completion_time: NSRange);

        #[cfg(all(
            feature = "ClassKit_CLSProgressReportingCapability",
            feature = "Foundation_NSSet"
        ))]
        #[method_id(@__retain_semantics Other progressReportingCapabilities)]
        pub unsafe fn progressReportingCapabilities(
            &self,
        ) -> Id<NSSet<CLSProgressReportingCapability>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other summary)]
        pub unsafe fn summary(&self) -> Option<Id<NSString>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setSummary:)]
        pub unsafe fn setSummary(&self, summary: Option<&NSString>);

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Init initWithType:identifier:title:)]
        pub unsafe fn initWithType_identifier_title(
            this: Option<Allocated<Self>>,
            r#type: CLSContextType,
            identifier: &NSString,
            title: &NSString,
        ) -> Id<Self>;

        #[method(isActive)]
        pub unsafe fn isActive(&self) -> bool;

        #[method(becomeActive)]
        pub unsafe fn becomeActive(&self);

        #[method(resignActive)]
        pub unsafe fn resignActive(&self);

        #[method(setType:)]
        pub unsafe fn setType(&self, r#type: CLSContextType);

        #[cfg(all(
            feature = "ClassKit_CLSProgressReportingCapability",
            feature = "Foundation_NSSet"
        ))]
        #[method(addProgressReportingCapabilities:)]
        pub unsafe fn addProgressReportingCapabilities(
            &self,
            capabilities: &NSSet<CLSProgressReportingCapability>,
        );

        #[method(resetProgressReportingCapabilities)]
        pub unsafe fn resetProgressReportingCapabilities(&self);
    }
);

extern_methods!(
    /// Hierarchy
    #[cfg(feature = "ClassKit_CLSContext")]
    unsafe impl CLSContext {
        #[method_id(@__retain_semantics Other parent)]
        pub unsafe fn parent(&self) -> Option<Id<CLSContext>>;

        #[method(removeFromParent)]
        pub unsafe fn removeFromParent(&self);

        #[method(addChildContext:)]
        pub unsafe fn addChildContext(&self, child: &CLSContext);

        #[cfg(all(
            feature = "Foundation_NSArray",
            feature = "Foundation_NSError",
            feature = "Foundation_NSString"
        ))]
        #[method(descendantMatchingIdentifierPath:completion:)]
        pub unsafe fn descendantMatchingIdentifierPath_completion(
            &self,
            identifier_path: &NSArray<NSString>,
            completion: &Block<(*mut CLSContext, *mut NSError), ()>,
        );

        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other navigationChildContexts)]
        pub unsafe fn navigationChildContexts(&self) -> Id<NSArray<CLSContext>>;

        #[method(addNavigationChildContext:)]
        pub unsafe fn addNavigationChildContext(&self, child: &CLSContext);

        #[method(removeNavigationChildContext:)]
        pub unsafe fn removeNavigationChildContext(&self, child: &CLSContext);
    }
);
