"use client"; import { motion } from "framer-motion"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui/components/button"; import { Dialog, DialogContent } from "@calcom/ui/components/dialog"; import { Icon, type IconName } from "@calcom/ui/components/icon"; import { Logo } from "@calcom/ui/components/logo"; import { useWelcomeModal } from "@calcom/web/modules/ee/organizations/hooks/useWelcomeModal"; const features = [ "1_parent_team_unlimited_subteams", "organization_workflows", "custom_subdomain", "instant_meetings", "collective_round_robin_events", "routing_forms", "team_workflows", ]; export function WelcomeToOrganizationsModal() { const { t } = useLocale(); const { isOpen, closeModal } = useWelcomeModal(); const SMALL = { outer: 32, icon: 16 }; const LARGE = { outer: 48, icon: 24 }; const RINGS = [60, 95, 130]; // Ring radii in px const RING_STROKE = 1; return ( !open && closeModal()}>
{/* Team illustration with rings */}
{/* Center origin */}
{/* Rings */} {RINGS.map((r, i) => (
))} {/* Central users icon */}
{/* Surrounding user icons */} {( [ { initialDeg: 30, duration: 20, icon: "user" }, { initialDeg: 190, duration: 25, icon: "user" }, { initialDeg: 320, duration: 15, icon: "user" }, { initialDeg: 280, duration: 20, icon: "building" }, ] as Array<{ initialDeg: number; duration: number; icon: IconName }> ).map(({ initialDeg, duration, icon }, index) => { const r = RINGS[index % RINGS.length]; // icon orbit radius - each icon on a different ring (we have more icons than ring so we cycle through them) const steps = 60; const xKeyframes = []; const yKeyframes = []; for (let i = 0; i <= steps; i++) { const angle = initialDeg + (360 * i) / steps; xKeyframes.push(r * Math.cos((angle * Math.PI) / 180)); yKeyframes.push(r * Math.sin((angle * Math.PI) / 180)); } return ( // Lock the icon to the center of the ring and only translate on x and y `translate(-50%, -50%) translateX(${x}) translateY(${y})` }> ); })}

{t("welcome_to_organizations")}

{t("organizations_welcome_description")}

{features.map((feature) => (
{t(feature)}
))}
); }