40 lines
2.1 KiB
TypeScript
40 lines
2.1 KiB
TypeScript
// Metro module 15126 (f15127).
|
|
import ActionSheetActionCreators, { showActionSheet } from "../../action_sheet/native/ActionSheetActionCreators";
|
|
import { openAddFavoriteChannelModal } from "./AddFavoriteChannelModal";
|
|
import { openAddFavoriteCategoryActionSheet } from "./AddFavoriteCategoryActionSheet";
|
|
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 FavoritesGuild_messages from "../intl/FavoritesGuild.messages";
|
|
import { StarOutlineIcon } from "../../../design/components/Icon/native/redesign/generated/StarOutlineIcon";
|
|
import { FolderPlusIcon } from "../../../design/components/Icon/native/redesign/generated/FolderPlusIcon";
|
|
let key, handleCreateCategory, FavoritesGuildAddActionSheet;
|
|
const handleAddToFavorites = function handleAddToFavorites() {
|
|
ActionSheetActionCreators.hideActionSheet(key);
|
|
openAddFavoriteChannelModal({
|
|
source: "favorites_header_add_button_context_menu"
|
|
});
|
|
};
|
|
handleCreateCategory = function handleCreateCategory() {
|
|
ActionSheetActionCreators.hideActionSheet(key);
|
|
openAddFavoriteCategoryActionSheet();
|
|
};
|
|
FavoritesGuildAddActionSheet = function FavoritesGuildAddActionSheet() {
|
|
return <ActionSheet header={<BottomSheetTitleHeader title={intl.string(t.wMWyci)} />}>
|
|
<ActionSheetRow.Group hasIcons>
|
|
<ActionSheetRow label={intl.string(FavoritesGuild_messages.G9fGlP)} icon={<ActionSheetRow.Icon IconComponent={StarOutlineIcon} />} onPress={handleAddToFavorites} />
|
|
</ActionSheetRow.Group>
|
|
<ActionSheetRow.Group hasIcons>
|
|
<ActionSheetRow label={intl.string(t["ISN+NM"])} icon={<ActionSheetRow.Icon IconComponent={FolderPlusIcon} />} onPress={handleCreateCategory} />
|
|
</ActionSheetRow.Group>
|
|
</ActionSheet>;
|
|
};
|
|
key = "FavoritesGuildAddActionSheet";
|
|
export function openFavoritesGuildAddActionSheet() {
|
|
showActionSheet({
|
|
content: <FavoritesGuildAddActionSheet />,
|
|
key
|
|
});
|
|
}
|