use objc::{msg_send, sel, sel_impl};
use rust_macios_objective_c_runtime_proc_macros::interface_impl;
use crate::{
foundation::NSString,
object,
objective_c_runtime::traits::{FromId, PNSObject},
};
object! {
unsafe pub struct UNNotificationActionIcon;
}
#[interface_impl(NSObject)]
impl UNNotificationActionIcon {
#[method]
pub fn icon_with_system_image_name(system_image_name: NSString) -> Self
where
Self: Sized + FromId,
{
unsafe {
Self::from_id(msg_send![
Self::m_class(),
iconWithSystemImageName: system_image_name
])
}
}
#[method]
pub fn icon_with_template_image_name(template_image_name: NSString) -> Self
where
Self: Sized + FromId,
{
unsafe {
Self::from_id(msg_send![
Self::m_class(),
iconWithTemplateImageName: template_image_name
])
}
}
}