2021-08-10 21:19:22 +00:00
|
|
|
package com.discord.widgets.guildscheduledevent;
|
|
|
|
|
2021-10-15 06:18:26 +00:00
|
|
|
import c0.z.d.m;
|
2021-08-10 21:19:22 +00:00
|
|
|
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
|
2021-08-20 02:22:46 +00:00
|
|
|
import com.discord.api.utcdatetime.UtcDateTime;
|
|
|
|
import kotlin.Pair;
|
2021-08-10 21:19:22 +00:00
|
|
|
/* compiled from: GuildScheduledEventModel.kt */
|
|
|
|
public final class GuildScheduledEventModelKt {
|
|
|
|
public static final GuildScheduledEventModel toModel(GuildScheduledEvent guildScheduledEvent) {
|
|
|
|
m.checkNotNullParameter(guildScheduledEvent, "$this$toModel");
|
2021-08-20 02:22:46 +00:00
|
|
|
GuildScheduledEventPickerDateTime guildScheduledEventPickerDateTime = GuildScheduledEventPickerDateTime.INSTANCE;
|
|
|
|
Pair<GuildScheduledEventPickerDate, GuildScheduledEventPickerTime> fromUtcDateTime = guildScheduledEventPickerDateTime.fromUtcDateTime(guildScheduledEvent.j());
|
|
|
|
UtcDateTime i = guildScheduledEvent.i();
|
|
|
|
GuildScheduledEventPickerTime guildScheduledEventPickerTime = null;
|
|
|
|
Pair<GuildScheduledEventPickerDate, GuildScheduledEventPickerTime> fromUtcDateTime2 = i != null ? guildScheduledEventPickerDateTime.fromUtcDateTime(i) : null;
|
|
|
|
long f = guildScheduledEvent.f();
|
|
|
|
String h = guildScheduledEvent.h();
|
|
|
|
Long b = guildScheduledEvent.b();
|
|
|
|
GuildScheduledEventPickerDate first = fromUtcDateTime.getFirst();
|
|
|
|
GuildScheduledEventPickerTime second = fromUtcDateTime.getSecond();
|
|
|
|
GuildScheduledEventPickerDate first2 = fromUtcDateTime2 != null ? fromUtcDateTime2.getFirst() : null;
|
|
|
|
if (fromUtcDateTime2 != null) {
|
|
|
|
guildScheduledEventPickerTime = fromUtcDateTime2.getSecond();
|
|
|
|
}
|
2021-09-16 17:51:42 +00:00
|
|
|
return new GuildScheduledEventModel(f, h, b, first, second, first2, guildScheduledEventPickerTime, guildScheduledEvent.c(), guildScheduledEvent.e(), guildScheduledEvent.d(), guildScheduledEvent.l());
|
2021-08-10 21:19:22 +00:00
|
|
|
}
|
|
|
|
}
|