// Mock data for the Super Admin Dashboard

export const adminDashboardData = {
  // Business Health tab data
  businessHealth: {
    // Business Health Snapshot section
    snapshot: {
      activeCompanies: {
        total: 247,
        newThisMonth: 12,
        brokers: 182,
        builders: 65,
        trend: [
          { month: 'Jan', value: 210 },
          { month: 'Feb', value: 215 },
          { month: 'Mar', value: 225 },
          { month: 'Apr', value: 228 },
          { month: 'May', value: 235 },
          { month: 'Jun', value: 240 },
          { month: 'Jul', value: 247 }
        ]
      },
      activeUsers: {
        total: 3842,
        percentChange: 5.2,
        trend: [
          { month: 'Jan', value: 3200 },
          { month: 'Feb', value: 3350 },
          { month: 'Mar', value: 3450 },
          { month: 'Apr', value: 3500 },
          { month: 'May', value: 3650 },
          { month: 'Jun', value: 3750 },
          { month: 'Jul', value: 3842 }
        ]
      },
      financialSummary: {
        totalValue: 17.3,
        received: 10.8,
        receivable: 6.5,
        percentIncrease: 12.5,
        receivedTrend: [
          { month: 'Jan', value: 8.2 },
          { month: 'Feb', value: 8.8 },
          { month: 'Mar', value: 9.1 },
          { month: 'Apr', value: 9.5 },
          { month: 'May', value: 10.1 },
          { month: 'Jun', value: 10.4 },
          { month: 'Jul', value: 10.8 }
        ],
        receivableTrend: [
          { month: 'Jan', value: 5.8 },
          { month: 'Feb', value: 6.1 },
          { month: 'Mar', value: 6.3 },
          { month: 'Apr', value: 6.2 },
          { month: 'May', value: 6.4 },
          { month: 'Jun', value: 6.6 },
          { month: 'Jul', value: 6.5 }
        ]
      },
      revenueMetrics: {
        mrr: {
          value: 24.8,
          unit: "L",
          currency: "₹",
          growth: 18.3,
          growthType: "YoY"
        },
        arr: {
          value: 2.97,
          unit: "Cr",
          currency: "₹",
          growth: 21.5,
          growthType: "YoY"
        },
        arpu: {
          value: 645,
          unit: "",
          currency: "₹",
          growth: 42,
          growthType: "from last quarter"
        },
        churnRate: {
          value: 1.8,
          unit: "%",
          currency: "",
          growth: -0.3,
          growthType: "from last month"
        }
      }
    },
    // Add more business health sections here as needed
  },
  
  // Usage & Engagement tab data
  usageEngagement: {
    insights: {
      topActiveClients: [
        {
          companyName: "Rajyash Group",
          trend: 12,
          trendType: "up"
        },
        {
          companyName: "Ganesh Housing",
          trend: 8,
          trendType: "up"
        },
        {
          companyName: "Shilp Group",
          trend: 5,
          trendType: "up"
        },
        {
          companyName: "Shivalik Projects",
          trend: 3,
          trendType: "down"
        },
        {
          companyName: "Savvy Infrastructure",
          trend: 7,
          trendType: "up"
        }
      ],
      lowEngagementWatchlist: [
        {
          companyName: "Parshwanath Developers",
          lastActive: "21 days ago",
          status: "Risk"
        },
        {
          companyName: "Ratna Developers",
          lastActive: "18 days ago",
          status: "Risk"
        },
        {
          companyName: "Sheetal Infrastructure",
          lastActive: "32 days ago",
          status: "Dormant"
        },
        {
          companyName: "Goyal & Co.",
          lastActive: "15 days ago",
          status: "Risk"
        },
        {
          companyName: "Swati Procon",
          lastActive: "45 days ago",
          status: "Dormant"
        }
      ]
    },
    subscriptions: {
      expiringSubscriptions: [
        {
          companyName: "Goyal & Co.",
          expiresIn: 2
        },
        {
          companyName: "Sheetal Infrastructure",
          expiresIn: 5
        },
        {
          companyName: "Parshwanath Developers",
          expiresIn: 8
        },
        {
          companyName: "Ganesh Housing",
          expiresIn: 12
        },
        {
          companyName: "Shilp Group",
          expiresIn: 18
        }
      ]
    },
    storage: {
      fileStorageUsage: [
        {
          companyName: "Rajyash Group",
          storageUsed: 18.2,
          percentageOfTotal: 78
        },
        {
          companyName: "Ganesh Housing",
          storageUsed: 12.8,
          percentageOfTotal: 55
        },
        {
          companyName: "Shilp Group",
          storageUsed: 16.4,
          percentageOfTotal: 70
        },
        {
          companyName: "Shivalik Projects",
          storageUsed: 19.6,
          percentageOfTotal: 84
        },
        {
          companyName: "Savvy Infrastructure",
          storageUsed: 8.5,
          percentageOfTotal: 36
        }
      ],
      totalStorage: 65.5
    },
    features: {
      featureUsageOverview: [
        {
          feature: "Leads",
          percentage: 35,
        },
        {
          feature: "Projects",
          percentage: 25,
        },
        {
          feature: "Tasks",
          percentage: 20,
        },
        {
          feature: "Campaigns",
          percentage: 15,
        },
        {
          feature: "Other",
          percentage: 5,
        }
      ]
    },
    communication: {
      messagesSent: [
        {
          channel: "WhatsApp",
          current: 12845,
          previous: 11234,
          percentage: 85,
          color: "#10b981"
        },
        {
          channel: "SMS",
          current: 8562,
          previous: 9124,
          percentage: 65,
          color: "#3b82f6"
        },
        {
          channel: "Email",
          current: 5234,
          previous: 4876,
          percentage: 45,
          color: "#f59e0b"
        }
      ]
    }
  },
  
  // CRM Performance tab data
  crmPerformance: {
    dataPerformance: {
      contactsAdded: {
        value: 1284,
        timeframe: "This month",
        change: 12,
        changeType: "up"
      },
      leadsAdded: {
        value: 876,
        timeframe: "This month",
        change: 8,
        changeType: "up"
      },
      tasksCreated: {
        value: 2456,
        timeframe: "This month",
        change: 15,
        changeType: "up"
      },
      propertiesAdded: {
        value: 342,
        descriptor: "Units + Individual",
        change: 3,
        changeType: "down"
      },
      projectsAdded: {
        value: 18,
        timeframe: "This month",
        change: 5,
        changeType: "up"
      },
      salesMade: {
        value: 124,
        descriptor: "Total Units Sold",
        change: 22,
        changeType: "up"
      }
    },
    conversionRatios: {
      contactsToLeads: {
        title: "Contacts → Leads Ratio",
        subtitle: "% of contacts converted to leads",
        percentage: 68.2,
        change: 5.4,
        changeType: "up",
        metrics: {
          totalContacts: 1284,
          convertedToLeads: 876
        },
        chartData: [
          { name: "Converted", value: 68.2, color: "#10b981" },
          { name: "Unconverted", value: 31.8, color: "#e5e7eb" }
        ]
      },
      leadsToSiteVisit: {
        title: "Leads → Site Visit Ratio",
        subtitle: "% of leads converted to site visits",
        percentage: 35.5,
        change: 2.1,
        changeType: "up",
        metrics: {
          totalLeads: 876,
          siteVisits: 311
        },
        chartData: [
          { name: "Converted", value: 35.5, color: "#3b82f6" },
          { name: "Unconverted", value: 64.5, color: "#e5e7eb" }
        ]
      },
      siteVisitToBooking: {
        title: "Site Visit → Booking Ratio",
        subtitle: "% of site visits converted to bookings",
        percentage: 18.7,
        change: 1.3,
        changeType: "up",
        metrics: {
          siteVisits: 311,
          bookings: 58
        },
        chartData: [
          { name: "Converted", value: 18.7, color: "#f59e0b" },
          { name: "Unconverted", value: 81.3, color: "#e5e7eb" }
        ]
      }
    },
    leadSources: {
      topLeadSources: [
        {
          source: "Website",
          leadsReceived: 245,
          salesMade: 18,
          conversionRate: 7.3
        },
        {
          source: "Social Media",
          leadsReceived: 198,
          salesMade: 12,
          conversionRate: 6.1
        },
        {
          source: "Referrals",
          leadsReceived: 156,
          salesMade: 15,
          conversionRate: 9.6
        },
        {
          source: "Online Ads",
          leadsReceived: 134,
          salesMade: 8,
          conversionRate: 6.0
        },
        {
          source: "Direct Contact",
          leadsReceived: 98,
          salesMade: 11,
          conversionRate: 11.2
        },
        {
          source: "Print Media",
          leadsReceived: 87,
          salesMade: 6,
          conversionRate: 6.9
        },
        {
          source: "Events",
          leadsReceived: 76,
          salesMade: 9,
          conversionRate: 11.8
        },
        {
          source: "Cold Calling",
          leadsReceived: 65,
          salesMade: 4,
          conversionRate: 6.2
        },
        {
          source: "Email Campaigns",
          leadsReceived: 54,
          salesMade: 3,
          conversionRate: 5.6
        },
        {
          source: "Other",
          leadsReceived: 43,
          salesMade: 2,
          conversionRate: 4.7
        }
      ]
    }
  }
};
