import type { LicenseStatus, FeatureInfo } from '@/types/settings'

interface LicenseState {
  status: LicenseStatus
  isPro: boolean
  devMode: boolean
  settingsFrozen: boolean
  upgradeUrl: string
  supportEmail: string
  features: {
    enabled: Record<string, FeatureInfo>
    disabled: Record<string, FeatureInfo>
  }
}

/**
 * Hook for license status and feature gating
 */
export function useLicense() {
  // Legacy subscription/licensing has been removed.
  // We keep this hook for compatibility, but default to "Pro unlocked" behavior.
  const isLoading = false

  const license: LicenseState = {
    status: 'pro' as LicenseStatus,
    isPro: true,
    devMode: false,
    settingsFrozen: false,
    upgradeUrl: '',
    supportEmail: 'office@boost-media.co.il',
    features: {
      enabled: {} as Record<string, FeatureInfo>,
      disabled: {} as Record<string, FeatureInfo>,
    },
  }
  
  /**
   * Check if a feature is enabled
   */
  const isFeatureEnabled = (featureId: string): boolean => {
    void featureId
    return true
  }
  
  /**
   * Get feature info
   */
  const getFeature = (featureId: string): FeatureInfo | undefined => {
    void featureId
    return undefined
  }

  return {
    license,
    isLoading,
    isFeatureEnabled,
    getFeature,
  }
}



