1use gpui::{IntoElement, ParentElement};
2use ui::{List, ListBulletItem, prelude::*};
3
4/// Centralized definitions for Zed AI plans
5pub struct PlanDefinitions;
6
7impl PlanDefinitions {
8 pub fn free_plan(&self) -> impl IntoElement {
9 List::new()
10 .child(ListBulletItem::new("2,000 accepted edit predictions"))
11 .child(ListBulletItem::new(
12 "Unlimited prompts with your AI API keys",
13 ))
14 .child(ListBulletItem::new("Unlimited use of external agents"))
15 }
16
17 pub fn pro_trial(&self, period: bool) -> impl IntoElement {
18 List::new()
19 .child(ListBulletItem::new("$20 of tokens in Zed agent"))
20 .child(ListBulletItem::new("Unlimited edit predictions"))
21 .when(period, |this| {
22 this.child(ListBulletItem::new(
23 "Try it out for 14 days, no credit card required",
24 ))
25 })
26 }
27
28 pub fn pro_plan(&self) -> impl IntoElement {
29 List::new()
30 .child(ListBulletItem::new("$5 of tokens in Zed agent"))
31 .child(ListBulletItem::new("Usage-based billing beyond $5"))
32 .child(ListBulletItem::new("Unlimited edit predictions"))
33 }
34
35 pub fn business_plan(&self) -> impl IntoElement {
36 List::new()
37 .child(ListBulletItem::new("Unlimited edit predictions"))
38 .child(ListBulletItem::new("Usage-based billing"))
39 }
40
41 pub fn student_plan(&self) -> impl IntoElement {
42 List::new()
43 .child(ListBulletItem::new("Unlimited edit predictions"))
44 .child(ListBulletItem::new("$10 of tokens in Zed agent"))
45 .child(ListBulletItem::new(
46 "Optional credit packs for additional usage",
47 ))
48 }
49}