# frozen_string_literal: true

require_relative "../base"

module Neetob
  class CLI
    module Sre
      class Base < CLI::Base
        APPS_LIST = {
          "heroku": [
            "neeto-deploy-web-production"
          ],
          "neetodeploy": [
            "neeto-auth-web-staging",
            "neeto-auth-web-production",
            "neeto-chat-web-staging",
            "neeto-chat-web-production",
            "neeto-cal-web-staging",
            "neeto-cal-web-production",
            "neeto-desk-web-staging",
            "neeto-desk-web-production",
            "neeto-kb-web-staging",
            "neeto-kb-web-production",
            "neeto-invoice-web-staging",
            "neeto-invoice-web-production",
            "neeto-form-web-staging",
            "neeto-form-web-production",
            "neeto-runner-web-staging",
            "neeto-runner-web-production",
            "neeto-course-web-staging",
            "neeto-course-web-production",
            "neeto-ci-web-production",
            "neeto-code-web-production",
            "neeto-code-web-staging",
            "neeto-crm-web-production",
            "neeto-crm-web-staging",
            "neeto-git-web-production",
            "neeto-git-web-staging",
            "neeto-planner-web-production",
            "neeto-planner-web-staging",
            "neeto-quiz-web-production",
            "neeto-quiz-web-staging",
            "neeto-record-web-production",
            "neeto-record-web-staging",
            "neeto-replay-web-production",
            "neeto-replay-web-staging",
            "neeto-site-web-production",
            "neeto-site-web-staging",
            "neeto-testify-web-production",
            "neeto-testify-web-staging",
            "neeto-tower-web-production",
            "neeto-tower-web-staging",
            "neeto-wireframe-web-production",
            "neeto-wireframe-web-staging",
            "neeto-publish-web-staging",
            "neeto-publish-web-production",
            "neeto-playdash-web-staging",
            "neeto-playdash-web-production",
            "neeto-engage-web-staging",
            "neeto-engage-web-production"
          ]
        }

        RESOURCES = {
          "NeetoChat": {
            "staging": {
              dns: "neetochat.net",
              app: "neeto-chat-web-staging"
            },
            "production": {
              dns: "neetochat.com",
              app: "neeto-chat-web-production"
            }
          },
          "NeetoAuth": {
            "staging": {
              dns: "neetoauth.net",
              app: "neeto-auth-web-staging"
            },
            "production": {
              dns: "neetoauth.com",
              app: "neeto-auth-web-production"
            }
          },
          "NeetoCal": {
            "staging": {
              dns: "neetocal.net",
              app: "neeto-cal-web-staging"
            },
            "production": {
              dns: "neetocal.com",
              app: "neeto-cal-web-production"
            }
          },
          "NeetoDesk": {
            "staging": {
              dns: "neetodesk.net",
              app: "neeto-desk-web-staging"
            },
            "production": {
              dns: "neetodesk.com",
              app: "neeto-desk-web-production"
            }
          },
          "NeetoKB": {
            "staging": {
              dns: "neetokb.net",
              app: "neeto-kb-web-staging"
            },
            "production": {
              dns: "neetokb.com",
              app: "neeto-kb-web-production"
            }
          },
          "NeetoInvoice": {
            "staging": {
              dns: "neetoinvoice.net",
              app: "neeto-invoice-web-staging"
            },
            "production": {
              dns: "neetoinvoice.com",
              app: "neeto-invoice-web-production"
            }
          },
          "NeetoForm": {
            "staging": {
              dns: "neetoform.net",
              app: "neeto-form-web-staging"
            },
            "production": {
              dns: "neetoform.com",
              app: "neeto-form-web-production"
            }
          },
          "NeetoRunner": {
            "staging": {
              dns: "neetorunner.net",
              app: "neeto-runner-web-staging"
            },
            "production": {
              dns: "neetorunner.com",
              app: "neeto-runner-web-production"
            }
          },
          "NeetoCourse": {
            "staging": {
              dns: "neetocourse.net",
              app: "neeto-course-web-staging"
            },
            "production": {
              dns: "neetocourse.com",
              app: "neeto-course-web-production"
            }
          },
          "NeetoDeploy": {
            "production": {
              dns: "neetodeploy.com",
              app: "neeto-deploy-web-production"
            }
          },
          "NeetoCi": {
            "production": {
              dns: "neetoci.com",
              app: "neeto-ci-web-production"
            }
          },
          "NeetoCode": {
            "staging": {
              dns: "neetocode.net",
              app: "neeto-code-web-staging"
            },
            "production": {
              dns: "neetocode.com",
              app: "neeto-code-web-production"
            }
          },
          "NeetoCrm": {
            "staging": {
              dns: "neetocrm.net",
              app: "neeto-crm-web-staging"
            },
            "production": {
              dns: "neetocrm.com",
              app: "neeto-crm-web-production"
            }
          },
          "NeetoGit": {
            "staging": {
              dns: "neetogit.net",
              app: "neeto-git-web-staging"
            },
            "production": {
              dns: "neetogit.com",
              app: "neeto-git-web-production"
            }
          },
          "NeetoPlanner": {
            "staging": {
              dns: "neetoplanner.net",
              app: "neeto-planner-web-staging"
            },
            "production": {
              dns: "neetoplanner.com",
              app: "neeto-planner-web-production"
            }
          },
          "NeetoPublish": {
            "staging": {
              dns: "neetopublish.net",
              app: "neeto-publish-web-staging"
            },
            "production": {
              dns: "neetopublish.com",
              app: "neeto-publish-web-production"
            }
          },
          "NeetoQuiz": {
            "staging": {
              dns: "neetoquiz.net",
              app: "neeto-quiz-web-staging"
            },
            "production": {
              dns: "neetoquiz.com",
              app: "neeto-quiz-web-production"
            }
          },
          "NeetoRecord": {
            "staging": {
              dns: "neetorecord.net",
              app: "neeto-record-web-staging"
            },
            "production": {
              dns: "neetorecord.com",
              app: "neeto-record-web-production"
            }
          },
          "NeetoReplay": {
            "staging": {
              dns: "neetoreplay.net",
              app: "neeto-replay-web-staging"
            },
            "production": {
              dns: "neetoreplay.com",
              app: "neeto-replay-web-production"
            }
          },
          "NeetoSite": {
            "staging": {
              dns: "neetosite.net",
              app: "neeto-site-web-staging"
            },
            "production": {
              dns: "neetosite.com",
              app: "neeto-site-web-production"
            }
          },
          "NeetoTestify": {
            "staging": {
              dns: "neetotestify.net",
              app: "neeto-testify-web-staging"
            },
            "production": {
              dns: "neetotestify.com",
              app: "neeto-testify-web-production"
            }
          },
          "NeetoTower": {
            "staging": {
              dns: "neetotower.net",
              app: "neeto-tower-web-staging"
            },
            "production": {
              dns: "neetotower.com",
              app: "neeto-tower-web-production"
            }
          },
          "NeetoWireframe": {
            "staging": {
              dns: "neetowireframe.net",
              app: "neeto-wireframe-web-staging"
            },
            "production": {
              dns: "neetowireframe.com",
              app: "neeto-wireframe-web-production"
            }
          },
          "NeetoEngage": {
            "staging": {
              dns: "neetoengage.net",
              app: "neeto-engage-web-staging"
            },
            "production": {
              dns: "neetoengage.com",
              app: "neeto-engage-web-production"
            }
          },
          "NeetoPlaydash": {
            "staging": {
              dns: "neetoplaydash.net",
              app: "neeto-playdash-web-staging"
            },
            "production": {
              dns: "neetoplaydash.com",
              app: "neeto-playdash-web-production"
            }
          }
        }

        def initialize
          super()
        end

        private

          def is_heroku(app_name)
            APPS_LIST[:heroku].include?(app_name)
          end
      end
    end
  end
end