38 lines
2.3 KiB
TypeScript
38 lines
2.3 KiB
TypeScript
// Metro module 15121 (f15122).
|
|
import useFavoritesGuildHideAction from "../hooks/useFavoritesGuildHideAction";
|
|
import useFavoritesGuildResetAction from "../hooks/useFavoritesGuildResetAction";
|
|
import { ActionSheet } from "../../../design/components/Sheet/native/ActionSheet.native";
|
|
import { BottomSheetTitleHeader } from "../../../design/components/Sheet/native/BottomSheetTitleHeader.native";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import { ActionSheetRow } from "../../../design/components/Sheet/native/ActionSheetRow.native";
|
|
import { XSmallIcon } from "../../../design/components/Icon/native/redesign/generated/XSmallIcon";
|
|
import { EyeSlashIcon } from "../../../design/components/Icon/native/redesign/generated/EyeSlashIcon";
|
|
import ActionSheetActionCreators, { showActionSheet } from "../../action_sheet/native/ActionSheetActionCreators";
|
|
import { TrashIcon } from "../../../design/components/Icon/native/redesign/generated/TrashIcon";
|
|
let key;
|
|
const FavoritesGuildActionSheet = function FavoritesGuildActionSheet() {
|
|
const favoritesGuildHideAction = useFavoritesGuildHideAction();
|
|
let c21694_0 = favoritesGuildHideAction;
|
|
const favoritesGuildResetAction = useFavoritesGuildResetAction();
|
|
let c21694_1 = favoritesGuildResetAction;
|
|
return <ActionSheet header={<BottomSheetTitleHeader title={intl.string(t.wMWyci)} />}>
|
|
<ActionSheetRow.Group hasIcons>
|
|
<ActionSheetRow label={favoritesGuildHideAction.label} subLabel={favoritesGuildHideAction.subLabel} icon={<ActionSheetRow.Icon IconComponent={favoritesGuildHideAction.isPreview ? XSmallIcon : EyeSlashIcon} />} variant={favoritesGuildHideAction.isPreview ? "default" : "danger"} onPress={() => {
|
|
ActionSheetActionCreators.hideActionSheet(key);
|
|
c21694_0.perform();
|
|
}} />
|
|
{favoritesGuildResetAction.isAvailable ? <ActionSheetRow label={favoritesGuildResetAction.label} subLabel={favoritesGuildResetAction.subLabel} icon={<ActionSheetRow.Icon IconComponent={TrashIcon} />} variant="danger" onPress={() => {
|
|
ActionSheetActionCreators.hideActionSheet(key);
|
|
c21694_1.perform();
|
|
}} /> : null}
|
|
</ActionSheetRow.Group>
|
|
</ActionSheet>;
|
|
};
|
|
key = "FavoritesGuildActionSheet";
|
|
export function openFavoritesGuildActionSheet() {
|
|
showActionSheet({
|
|
content: <FavoritesGuildActionSheet />,
|
|
key
|
|
});
|
|
}
|