diff --git a/packages/atoms/EventTypeList/EventType.tsx b/packages/atoms/EventTypeList/EventType.tsx
index d0d4317947..32a39b44c7 100644
--- a/packages/atoms/EventTypeList/EventType.tsx
+++ b/packages/atoms/EventTypeList/EventType.tsx
@@ -1,12 +1,19 @@
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
-import { DropdownMenu, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+ DropdownMenuSeparator,
+} from "@/components/ui/dropdown-menu";
import { Switch } from "@/components/ui/switch";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
-import { MoreHorizontal } from "lucide-react";
+import { MoreHorizontal, ExternalLink, LinkIcon, Edit2, Copy, Trash, Code } from "lucide-react";
import { memo } from "react";
import { useOrgBranding } from "@calcom/ee/organizations/context/provider";
+import { EventTypeEmbedButton } from "@calcom/features/embed/EventTypeEmbed";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { SchedulingType } from "@calcom/prisma/enums";
import { ArrowButton, AvatarGroup, ButtonGroup } from "@calcom/ui";
@@ -63,22 +70,37 @@ const MemoizedItem = memo(Item);
export function EventType({
event,
+ group,
type,
+ readOnly,
index,
firstItem,
lastItem,
moveEventType,
- setHiddenMutation,
+ onMutate,
+ onCopy,
+ onEdit,
+ onDuplicate,
+ onPreview,
}: {
event: any;
+ group: any;
type: any;
+ readOnly: boolean;
index: number;
firstItem: { id: string };
lastItem: { id: string };
moveEventType: (index: number, increment: 1 | -1) => void;
- setHiddenMutation: () => void;
+ onMutate: ({ hidden, id }: { hidden: boolean; id: string }) => void;
+ onCopy: (linnk: string) => void;
+ onEdit: (id: string) => void;
+ onDuplicate: (id: string) => void;
+ onPreview: (link: string) => void;
}) {
const isManagedEventType = type.schedulingType === SchedulingType.MANAGED;
+ const embedLink = `${group.profile.slug}/${type.slug}`;
+ const isChildrenManagedEventType =
+ type.metadata?.managedEventConfig !== undefined && type.schedulingType !== SchedulingType.MANAGED;
const orgBranding = useOrgBranding();
return (
@@ -136,7 +158,7 @@ export function EventType({
name="hidden"
checked={!type.hidden}
onClick={() => {
- setHiddenMutation.mutate({ id: type.id, hidden: !type.hidden });
+ onMutate({ id: type.id, hidden: !type.hidden });
}}
/>
@@ -154,14 +176,14 @@ export function EventType({