import 'package:flutter/material.dart';

const String APP_NAME = 'AnyWay';

String API_URL_BASE = 'https://anyway.anydev.info';
String API_URL_DEBUG = 'https://anyway-stg.anydev.info';
String PRIVACY_URL = 'https://anydev.info/privacy';

const String MAP_ID = '41c21ac9b81dbfd8';


const Color GRADIENT_START = Color(0xFFF9B208);
const Color GRADIENT_END = Color(0xFFE72E77);

const Color PRIMARY_COLOR = Color(0xFFF38F1A);



const double TRIP_PANEL_MAX_HEIGHT = 0.8;
const double TRIP_PANEL_MIN_HEIGHT = 0.12;

ThemeData APP_THEME = ThemeData(
  primaryColor: PRIMARY_COLOR,

  scaffoldBackgroundColor: Colors.white,
  cardColor: Colors.white,
  useMaterial3: true,

  colorScheme: const ColorScheme.light(
    primary: PRIMARY_COLOR,
    secondary: GRADIENT_END,
    surface: Colors.white,
    error: Colors.red,
    onPrimary: Colors.white,
    onSecondary: Color.fromARGB(255, 30, 22, 22),
    onSurface: Colors.black,
    onError: Colors.white,
    brightness: Brightness.light,
  ),


  textButtonTheme: const TextButtonThemeData(
    style: ButtonStyle(
      foregroundColor: WidgetStatePropertyAll(PRIMARY_COLOR),
      side: WidgetStatePropertyAll(
        BorderSide(
          color: PRIMARY_COLOR,
          width: 1,
        ),
      ),
    )
    ),

  elevatedButtonTheme: const ElevatedButtonThemeData(
    style: ButtonStyle(
      foregroundColor: WidgetStatePropertyAll(PRIMARY_COLOR),
    )
  ),

  outlinedButtonTheme: const OutlinedButtonThemeData(
    style: ButtonStyle(
      foregroundColor: WidgetStatePropertyAll(PRIMARY_COLOR),
    )
  ),


  sliderTheme: const SliderThemeData(
    trackHeight: 15,
    inactiveTrackColor: Colors.grey,
    thumbColor: PRIMARY_COLOR,
    activeTrackColor: GRADIENT_END
  )
);


const Gradient APP_GRADIENT = LinearGradient(
  begin: Alignment.topLeft,
  end: Alignment.bottomRight,
  colors: [GRADIENT_START, GRADIENT_END],
);


final GlobalKey<ScaffoldMessengerState> rootScaffoldMessengerKey = GlobalKey<ScaffoldMessengerState>();
