// Path: app/src/main/java/dev/wisebite/wisebite/domain/Restaurant.java
// @Getter
// @Setter
// @AllArgsConstructor(suppressConstructorProperties = true)
// @NoArgsConstructor
// @ToString
// @Builder
// public class Restaurant implements Entity {
// 
//     private String id;
//     private String name;
//     private String location;
//     private Integer phone;
//     private String description;
//     private String website;
//     private Integer numberOfTables;
// 
//     private Map<String, Object> openTimes = new LinkedHashMap<>();
//     private Map<String, Object> menus = new LinkedHashMap<>();
//     private Map<String, Object> dishes = new LinkedHashMap<>();
//     private Map<String, Object> users = new LinkedHashMap<>();
//     private Map<String, Object> externalOrders = new LinkedHashMap<>();
//     private Map<String, Object> reviews = new LinkedHashMap<>();
// 
//     @Override
//     public String getId() {
//         return id;
//     }
// 
//     @Override
//     public void setId(String id) {
//         this.id = id;
//     }
// 
// }
// 
// Path: app/src/main/java/dev/wisebite/wisebite/service/ServiceFactory.java
// public final class ServiceFactory {
// 
//     private static DishService dishService;
//     private static ImageService imageService;
//     private static MenuService menuService;
//     private static OpenTimeService openTimeService;
//     private static OrderItemService orderItemService;
//     private static OrderService orderService;
//     private static RestaurantService restaurantService;
//     private static ReviewService reviewService;
//     private static UserService userService;
// 
//     public static DishService getDishService(Context context){
//         if (dishService == null)
//             dishService = new DishService(
//                     new DishRepository(context));
//         return dishService;
//     }
// 
//     public static ImageService getImageService(Context context){
//         if (imageService == null)
//             imageService = new ImageService(
//                     new ImageRepository(context));
//         return imageService;
//     }
// 
//     public static MenuService getMenuService(Context context){
//         if (menuService == null)
//             menuService = new MenuService(
//                     new MenuRepository(context),
//                     new DishRepository(context));
//         return menuService;
//     }
// 
//     public static OpenTimeService getOpenTimeService(Context context){
//         if (openTimeService == null)
//             openTimeService = new OpenTimeService(
//                     new OpenTimeRepository(context));
//         return openTimeService;
//     }
// 
//     public static OrderItemService getOrderItemService(Context context){
//         if (orderItemService == null)
//             orderItemService = new OrderItemService(
//                     new OrderItemRepository(context),
//                     new DishRepository(context),
//                     new MenuRepository(context));
//         return orderItemService;
//     }
// 
//     public static OrderService getOrderService(Context context){
//         if (orderService == null)
//             orderService = new OrderService(
//                     new OrderRepository(context),
//                     new OrderItemRepository(context),
//                     new DishRepository(context),
//                     new MenuRepository(context),
//                     new RestaurantRepository(context),
//                     new UserRepository(context));
//         return orderService;
//     }
// 
//     public static RestaurantService getRestaurantService(Context context){
//         if (restaurantService == null)
//             restaurantService = new RestaurantService(
//                     new RestaurantRepository(context),
//                     new MenuRepository(context),
//                     new DishRepository(context),
//                     new ImageRepository(context),
//                     new OpenTimeRepository(context),
//                     new OrderRepository(context),
//                     new OrderItemRepository(context),
//                     new UserRepository(context),
//                     new ReviewRepository(context));
//         return restaurantService;
//     }
// 
//     public static ReviewService getReviewService(Context context) {
//         if (reviewService == null) {
//             reviewService = new ReviewService(
//                     new ReviewRepository(context),
//                     new RestaurantRepository(context),
//                     new DishRepository(context),
//                     new MenuRepository(context),
//                     new UserRepository(context));
//         }
//         return reviewService;
//     }
// 
//     public static UserService getUserService(Context context){
//         if (userService == null)
//             userService = new UserService(
//                     new UserRepository(context),
//                     new ImageRepository(context),
//                     new RestaurantRepository(context),
//                     new OrderRepository(context),
//                     new OrderItemRepository(context));
//         return userService;
//     }
// 
//     public static Integer getServiceCount() {
//         return 9;
//     }
// }
// 
// Path: app/src/main/java/dev/wisebite/wisebite/utils/BaseActivity.java
// public class BaseActivity extends AppCompatActivity {
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         Preferences.init(getApplicationContext());
//     }
// 
//     @Override
//     public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {
//         super.onCreate(savedInstanceState, persistentState);
//         Preferences.init(getApplicationContext());
//     }
// 
// }


import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TextInputLayout;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.view.View;
import android.view.WindowManager;
import android.widget.EditText;
import dev.wisebite.wisebite.R;
import dev.wisebite.wisebite.domain.Restaurant;
import dev.wisebite.wisebite.service.ServiceFactory;
import dev.wisebite.wisebite.utils.BaseActivity;
package dev.wisebite.wisebite.activity;



public class CreateRestaurantInfoActivity extends BaseActivity {

    private EditText inputName, inputLocation, inputPhone,
            inputDescription, inputWebsite, inputNumberOfTables;
    private TextInputLayout inputLayoutName, inputLayoutLocation, inputLayoutPhone,
            inputLayoutDescription, inputLayoutWebsite, inputLayoutNumberOfTables;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_create_restaurant_info);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        if (getSupportActionBar() != null) getSupportActionBar().setDisplayHomeAsUpEnabled(true);

// Path: app/src/main/java/dev/wisebite/wisebite/domain/Restaurant.java
// @Getter
// @Setter
// @AllArgsConstructor(suppressConstructorProperties = true)
// @NoArgsConstructor
// @ToString
// @Builder
// public class Restaurant implements Entity {
// 
//     private String id;
//     private String name;
//     private String location;
//     private Integer phone;
//     private String description;
//     private String website;
//     private Integer numberOfTables;
// 
//     private Map<String, Object> openTimes = new LinkedHashMap<>();
//     private Map<String, Object> menus = new LinkedHashMap<>();
//     private Map<String, Object> dishes = new LinkedHashMap<>();
//     private Map<String, Object> users = new LinkedHashMap<>();
//     private Map<String, Object> externalOrders = new LinkedHashMap<>();
//     private Map<String, Object> reviews = new LinkedHashMap<>();
// 
//     @Override
//     public String getId() {
//         return id;
//     }
// 
//     @Override
//     public void setId(String id) {
//         this.id = id;
//     }
// 
// }
// 
// Path: app/src/main/java/dev/wisebite/wisebite/service/ServiceFactory.java
// public final class ServiceFactory {
// 
//     private static DishService dishService;
//     private static ImageService imageService;
//     private static MenuService menuService;
//     private static OpenTimeService openTimeService;
//     private static OrderItemService orderItemService;
//     private static OrderService orderService;
//     private static RestaurantService restaurantService;
//     private static ReviewService reviewService;
//     private static UserService userService;
// 
//     public static DishService getDishService(Context context){
//         if (dishService == null)
//             dishService = new DishService(
//                     new DishRepository(context));
//         return dishService;
//     }
// 
//     public static ImageService getImageService(Context context){
//         if (imageService == null)
//             imageService = new ImageService(
//                     new ImageRepository(context));
//         return imageService;
//     }
// 
//     public static MenuService getMenuService(Context context){
//         if (menuService == null)
//             menuService = new MenuService(
//                     new MenuRepository(context),
//                     new DishRepository(context));
//         return menuService;
//     }
// 
//     public static OpenTimeService getOpenTimeService(Context context){
//         if (openTimeService == null)
//             openTimeService = new OpenTimeService(
//                     new OpenTimeRepository(context));
//         return openTimeService;
//     }
// 
//     public static OrderItemService getOrderItemService(Context context){
//         if (orderItemService == null)
//             orderItemService = new OrderItemService(
//                     new OrderItemRepository(context),
//                     new DishRepository(context),
//                     new MenuRepository(context));
//         return orderItemService;
//     }
// 
//     public static OrderService getOrderService(Context context){
//         if (orderService == null)
//             orderService = new OrderService(
//                     new OrderRepository(context),
//                     new OrderItemRepository(context),
//                     new DishRepository(context),
//                     new MenuRepository(context),
//                     new RestaurantRepository(context),
//                     new UserRepository(context));
//         return orderService;
//     }
// 
//     public static RestaurantService getRestaurantService(Context context){
//         if (restaurantService == null)
//             restaurantService = new RestaurantService(
//                     new RestaurantRepository(context),
//                     new MenuRepository(context),
//                     new DishRepository(context),
//                     new ImageRepository(context),
//                     new OpenTimeRepository(context),
//                     new OrderRepository(context),
//                     new OrderItemRepository(context),
//                     new UserRepository(context),
//                     new ReviewRepository(context));
//         return restaurantService;
//     }
// 
//     public static ReviewService getReviewService(Context context) {
//         if (reviewService == null) {
//             reviewService = new ReviewService(
//                     new ReviewRepository(context),
//                     new RestaurantRepository(context),
//                     new DishRepository(context),
//                     new MenuRepository(context),
//                     new UserRepository(context));
//         }
//         return reviewService;
//     }
// 
//     public static UserService getUserService(Context context){
//         if (userService == null)
//             userService = new UserService(
//                     new UserRepository(context),
//                     new ImageRepository(context),
//                     new RestaurantRepository(context),
//                     new OrderRepository(context),
//                     new OrderItemRepository(context));
//         return userService;
//     }
// 
//     public static Integer getServiceCount() {
//         return 9;
//     }
// }
// 
// Path: app/src/main/java/dev/wisebite/wisebite/utils/BaseActivity.java
// public class BaseActivity extends AppCompatActivity {
// 
//     @Override
//     protected void onResume() {
//         super.onResume();
//         Preferences.init(getApplicationContext());
//     }
// 
//     @Override
//     public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {
//         super.onCreate(savedInstanceState, persistentState);
//         Preferences.init(getApplicationContext());
//     }
// 
// }


// Path: app/src/main/java/dev/wisebite/wisebite/activity/CreateRestaurantInfoActivity.java
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TextInputLayout;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.view.View;
import android.view.WindowManager;
import android.widget.EditText;
import dev.wisebite.wisebite.R;
import dev.wisebite.wisebite.domain.Restaurant;
import dev.wisebite.wisebite.service.ServiceFactory;
import dev.wisebite.wisebite.utils.BaseActivity;

package dev.wisebite.wisebite.activity;



public class CreateRestaurantInfoActivity extends BaseActivity {

    private EditText inputName, inputLocation, inputPhone,
            inputDescription, inputWebsite, inputNumberOfTables;
    private TextInputLayout inputLayoutName, inputLayoutLocation, inputLayoutPhone,
            inputLayoutDescription, inputLayoutWebsite, inputLayoutNumberOfTables;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_create_restaurant_info);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        if (getSupportActionBar() != null) getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        ServiceFactory.getRestaurantService(CreateRestaurantInfoActivity.this);