We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Desktop: Previous Page Button hover color
A clear and concise description of the task.

## Acceptance Criteria

<!-- Remember to consider edge cases -->

- [ ] Hover color is blue, look at Figma

## Additional context

<!-- Add any other context about the task here -->


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `benefits/core/viewmodels.py`
Content:
```
1 """
2 The core application: view model definitions for the root of the webapp.
3 """
4 from django.utils.translation import pgettext, gettext_lazy as _
5 from django.urls import reverse
6 
7 from benefits.core import models
8 
9 from . import session
10 
11 
12 class Button:
13     """
14     Represents a clickable button as styled <a> element (with optional label, optional transparent fallback text):
15     * classes: str, str[]
16     * id: str
17     * fallback_text: str
18     * label: str
19     * text: str
20     * url: str
21     * target: str
22     * rel: str
23     """
24 
25     def __init__(self, **kwargs):
26         classes = kwargs.get("classes", [])
27         if isinstance(classes, str):
28             classes = classes.split()
29 
30         self.classes = ["btn", "btn-lg"]
31         self.classes.extend(classes)
32         self.id = kwargs.get("id")
33         self.fallback_text = kwargs.get("fallback_text")
34         self.label = kwargs.get("label")
35         self.text = kwargs.get("text", "Button")
36         self.url = kwargs.get("url")
37         self.target = kwargs.get("target")
38         self.rel = kwargs.get("rel")
39 
40     @staticmethod
41     def agency_contact_links(agency):
42         """Create link buttons for agency contact information."""
43         return [
44             Button.link(classes="agency", label=agency.long_name, text=agency.phone, url=f"tel:{agency.phone}"),
45             Button.link(
46                 classes="agency", text=agency.info_url, url=agency.info_url, target="_blank", rel="noopener noreferrer"
47             ),
48         ]
49 
50     @staticmethod
51     def home(request, text=None):
52         """Create a button back to this session's origin."""
53         if text is None:
54             text = _("core.buttons.return_home")
55 
56         return Button.primary(text=text, url=session.origin(request))
57 
58     @staticmethod
59     def link(**kwargs):
60         classes = kwargs.pop("classes", [])
61         if isinstance(classes, str):
62             classes = classes.split(" ")
63         classes.insert(0, "btn-link")
64         return Button(classes=classes, **kwargs)
65 
66     @staticmethod
67     def primary(**kwargs):
68         classes = kwargs.pop("classes", [])
69         if isinstance(classes, str):
70             classes = classes.split(" ")
71         classes.insert(0, "btn-primary")
72         return Button(classes=classes, **kwargs)
73 
74     @staticmethod
75     def outline_primary(**kwargs):
76         classes = kwargs.pop("classes", [])
77         if isinstance(classes, str):
78             classes = classes.split(" ")
79         classes.insert(0, "btn-outline-primary")
80         return Button(classes=classes, **kwargs)
81 
82     @staticmethod
83     def login(**kwargs):
84         """Create a login.gov button, with a login.gov logo and fallback text"""
85         btn = Button.primary(fallback_text="Login.gov", id="login", **kwargs)
86         return btn
87 
88     @staticmethod
89     def logout(**kwargs):
90         """Create a button that logs user out, with a login.gov button, with a login.gov logo and fallback text"""
91         btn = Button.primary(fallback_text="Login.gov", id="login", url=reverse("oauth:logout"), text="", **kwargs)
92         return btn
93 
94     @staticmethod
95     def previous_page(url):
96         kwargs = {"id": "previous-page-button", "text": _("core.buttons.previous_page"), "url": url}
97         btn = Button(**kwargs)
98         btn.classes.append("btn-outline-dark")
99         return btn
100 
101 
102 class Icon:
103     """Represents an icon."""
104 
105     def __init__(self, icon, alt):
106         self.src = f"img/icon/{icon}.svg"
107         self.alt = alt
108 
109 
110 class MediaItem:
111     """
112     Represents a media item in a list of items:
113     * icon: core.viewmodels.Icon
114     * details: str, str[]
115     * heading: str
116     * bullets: str, str[]
117     """
118 
119     def __init__(self, icon: Icon, details, heading=None, bullets=None):
120         self.icon = icon
121         if isinstance(details, str):
122             self.details = [details]
123         elif isinstance(details, list):
124             self.details = details
125         else:
126             self.details = [str(details)]
127         self.heading = heading
128         if isinstance(bullets, str):
129             self.bullets = [bullets]
130         elif isinstance(bullets, list):
131             self.bullets = bullets
132 
133 
134 class Page:
135     """
136     Represents a page of content:
137     * title: str
138     * icon: core.viewmodels.Icon
139     * headline: str
140     * paragraphs: str[]
141     * form: django.forms.Form
142     * forms: django.forms.Form[]
143     * button: core.viewmodels.Button
144     * buttons: core.viewmodels.Button[]
145     * classes: str[]
146     """
147 
148     def __init__(self, **kwargs):
149         self.title = kwargs.get("title")
150         if self.title is None:
151             self.title = _("core.pages.index.prefix")
152         else:
153             self.title = f"{_('core.pages.index.prefix')}: {self.title}"
154 
155         self.icon = kwargs.get("icon")
156         self.headline = kwargs.get("headline")
157         self.paragraphs = kwargs.get("paragraphs", [])
158         self.steps = kwargs.get("steps")
159 
160         self.forms = kwargs.get("forms", [])
161         if not isinstance(self.forms, list):
162             self.forms = [self.forms]
163         if "form" in kwargs:
164             self.forms.append(kwargs.get("form"))
165 
166         self.buttons = kwargs.get("buttons", [])
167         if not isinstance(self.buttons, list):
168             self.buttons = [self.buttons]
169         if "button" in kwargs:
170             self.buttons.append(kwargs.get("button"))
171 
172         self.classes = kwargs.get("classes", [])
173         if not isinstance(self.classes, list):
174             self.classes = self.classes.split(" ")
175 
176     def context_dict(self):
177         """Return a context dict for a Page."""
178         return {"page": self}
179 
180 
181 class ErrorPage(Page):
182     """
183     Represents an error page:
184     * title: str
185     * icon: core.viewmodels.Icon
186     * headline: str
187     * paragraphs: str[]
188     * button: core.viewmodels.Button
189     """
190 
191     def __init__(self, **kwargs):
192         super().__init__(
193             title=kwargs.get("title", _("core.pages.error.title")),
194             icon=kwargs.get("icon", Icon("sadbus", pgettext("image alt text", "core.icons.sadbus"))),
195             headline=kwargs.get("headline", _("core.pages.error.title")),
196             paragraphs=kwargs.get("paragraphs", [_("core.pages.server_error.headline")]),
197             button=kwargs.get("button"),
198         )
199 
200     @staticmethod
201     def user_error(
202         title=_("core.pages.user_error.title"),
203         headline=_("core.pages.user_error.headline"),
204         paragraphs=[_("core.pages.user_error.p[0]")],
205         **kwargs,
206     ):
207         """Create a new core.viewmodels.ErrorPage instance with defaults for a user error."""
208         return ErrorPage(title=title, headline=headline, paragraphs=paragraphs, **kwargs)
209 
210     @staticmethod
211     def server_error(
212         title=_("core.pages.server_error.title"),
213         headline=_("core.pages.server_error.title"),
214         paragraphs=[_("core.pages.server_error.p[0]")],
215         **kwargs,
216     ):
217         """Create a new core.viewmodels.ErrorPage instance with defaults for a generic server error."""
218         return ErrorPage(title=title, headline=headline, paragraphs=paragraphs, **kwargs)
219 
220     @staticmethod
221     def not_found(
222         title=_("core.pages.not_found.title"),
223         headline=_("core.pages.not_found.headline"),
224         paragraphs=[_("core.pages.not_found.p[0]")],
225         **kwargs,
226     ):
227         """Create a new core.viewmodels.ErrorPage with defaults for a 404."""
228         path = kwargs.pop("path", None)
229         if path and title:
230             title = f"{title}: {path}"
231         elif path and not title:
232             title = path
233         return ErrorPage(title=title, headline=headline, paragraphs=paragraphs, **kwargs)
234 
235 
236 class PaymentProcessor:
237     """
238     Represents a core.models.PaymentProcessor:
239     * model: core.models.PaymentProcessor
240     * access_token_url: str
241     * element_id: str
242     * color: str
243     * [name: str]
244     * [loading_text: str]
245     """
246 
247     def __init__(self, model, access_token_url, element_id, color, name=None, loading_text=_("core.buttons.wait")):
248         if isinstance(model, models.PaymentProcessor):
249             self.access_token_url = access_token_url
250             self.element_id = element_id
251             self.color = color
252             self.name = name or model.name
253             self.loading_text = loading_text
254             self.card_tokenize_url = model.card_tokenize_url
255             self.card_tokenize_func = model.card_tokenize_func
256             self.card_tokenize_env = model.card_tokenize_env
257 
258     def context_dict(self):
259         """Return a context dict for a PaymentProcessor."""
260         return {"payment_processor": self}
261 
262 
263 class TransitAgency:
264     """
265     Represents a core.models.TransitAgency:
266     * model: core.models.TransitAgency
267     """
268 
269     def __init__(self, model):
270         if isinstance(model, models.TransitAgency):
271             self.slug = model.slug
272             self.short_name = model.short_name
273             self.long_name = model.long_name
274             self.agency_id = model.agency_id
275             self.merchant_id = model.merchant_id
276             self.info_url = model.info_url
277             self.phone = model.phone
278 
279     def context_dict(self):
280         """Return a context dict for a TransitAgency."""
281         return {"agency": self}
282
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/benefits/core/viewmodels.py b/benefits/core/viewmodels.py
--- a/benefits/core/viewmodels.py
+++ b/benefits/core/viewmodels.py
@@ -93,10 +93,7 @@
 
     @staticmethod
     def previous_page(url):
-        kwargs = {"id": "previous-page-button", "text": _("core.buttons.previous_page"), "url": url}
-        btn = Button(**kwargs)
-        btn.classes.append("btn-outline-dark")
-        return btn
+        return Button(text=_("core.buttons.previous_page"), url=url)
 
 
 class Icon:

{"golden_diff": "diff --git a/benefits/core/viewmodels.py b/benefits/core/viewmodels.py\n--- a/benefits/core/viewmodels.py\n+++ b/benefits/core/viewmodels.py\n@@ -93,10 +93,7 @@\n \n     @staticmethod\n     def previous_page(url):\n-        kwargs = {\"id\": \"previous-page-button\", \"text\": _(\"core.buttons.previous_page\"), \"url\": url}\n-        btn = Button(**kwargs)\n-        btn.classes.append(\"btn-outline-dark\")\n-        return btn\n+        return Button(text=_(\"core.buttons.previous_page\"), url=url)\n \n \n class Icon:\n", "issue": "Desktop: Previous Page Button hover color\nA clear and concise description of the task.\r\n\r\n## Acceptance Criteria\r\n\r\n<!-- Remember to consider edge cases -->\r\n\r\n- [ ] Hover color is blue, look at Figma\r\n\r\n## Additional context\r\n\r\n<!-- Add any other context about the task here -->\r\n\n", "before_files": [{"content": "\"\"\"\nThe core application: view model definitions for the root of the webapp.\n\"\"\"\nfrom django.utils.translation import pgettext, gettext_lazy as _\nfrom django.urls import reverse\n\nfrom benefits.core import models\n\nfrom . import session\n\n\nclass Button:\n    \"\"\"\n    Represents a clickable button as styled <a> element (with optional label, optional transparent fallback text):\n    * classes: str, str[]\n    * id: str\n    * fallback_text: str\n    * label: str\n    * text: str\n    * url: str\n    * target: str\n    * rel: str\n    \"\"\"\n\n    def __init__(self, **kwargs):\n        classes = kwargs.get(\"classes\", [])\n        if isinstance(classes, str):\n            classes = classes.split()\n\n        self.classes = [\"btn\", \"btn-lg\"]\n        self.classes.extend(classes)\n        self.id = kwargs.get(\"id\")\n        self.fallback_text = kwargs.get(\"fallback_text\")\n        self.label = kwargs.get(\"label\")\n        self.text = kwargs.get(\"text\", \"Button\")\n        self.url = kwargs.get(\"url\")\n        self.target = kwargs.get(\"target\")\n        self.rel = kwargs.get(\"rel\")\n\n    @staticmethod\n    def agency_contact_links(agency):\n        \"\"\"Create link buttons for agency contact information.\"\"\"\n        return [\n            Button.link(classes=\"agency\", label=agency.long_name, text=agency.phone, url=f\"tel:{agency.phone}\"),\n            Button.link(\n                classes=\"agency\", text=agency.info_url, url=agency.info_url, target=\"_blank\", rel=\"noopener noreferrer\"\n            ),\n        ]\n\n    @staticmethod\n    def home(request, text=None):\n        \"\"\"Create a button back to this session's origin.\"\"\"\n        if text is None:\n            text = _(\"core.buttons.return_home\")\n\n        return Button.primary(text=text, url=session.origin(request))\n\n    @staticmethod\n    def link(**kwargs):\n        classes = kwargs.pop(\"classes\", [])\n        if isinstance(classes, str):\n            classes = classes.split(\" \")\n        classes.insert(0, \"btn-link\")\n        return Button(classes=classes, **kwargs)\n\n    @staticmethod\n    def primary(**kwargs):\n        classes = kwargs.pop(\"classes\", [])\n        if isinstance(classes, str):\n            classes = classes.split(\" \")\n        classes.insert(0, \"btn-primary\")\n        return Button(classes=classes, **kwargs)\n\n    @staticmethod\n    def outline_primary(**kwargs):\n        classes = kwargs.pop(\"classes\", [])\n        if isinstance(classes, str):\n            classes = classes.split(\" \")\n        classes.insert(0, \"btn-outline-primary\")\n        return Button(classes=classes, **kwargs)\n\n    @staticmethod\n    def login(**kwargs):\n        \"\"\"Create a login.gov button, with a login.gov logo and fallback text\"\"\"\n        btn = Button.primary(fallback_text=\"Login.gov\", id=\"login\", **kwargs)\n        return btn\n\n    @staticmethod\n    def logout(**kwargs):\n        \"\"\"Create a button that logs user out, with a login.gov button, with a login.gov logo and fallback text\"\"\"\n        btn = Button.primary(fallback_text=\"Login.gov\", id=\"login\", url=reverse(\"oauth:logout\"), text=\"\", **kwargs)\n        return btn\n\n    @staticmethod\n    def previous_page(url):\n        kwargs = {\"id\": \"previous-page-button\", \"text\": _(\"core.buttons.previous_page\"), \"url\": url}\n        btn = Button(**kwargs)\n        btn.classes.append(\"btn-outline-dark\")\n        return btn\n\n\nclass Icon:\n    \"\"\"Represents an icon.\"\"\"\n\n    def __init__(self, icon, alt):\n        self.src = f\"img/icon/{icon}.svg\"\n        self.alt = alt\n\n\nclass MediaItem:\n    \"\"\"\n    Represents a media item in a list of items:\n    * icon: core.viewmodels.Icon\n    * details: str, str[]\n    * heading: str\n    * bullets: str, str[]\n    \"\"\"\n\n    def __init__(self, icon: Icon, details, heading=None, bullets=None):\n        self.icon = icon\n        if isinstance(details, str):\n            self.details = [details]\n        elif isinstance(details, list):\n            self.details = details\n        else:\n            self.details = [str(details)]\n        self.heading = heading\n        if isinstance(bullets, str):\n            self.bullets = [bullets]\n        elif isinstance(bullets, list):\n            self.bullets = bullets\n\n\nclass Page:\n    \"\"\"\n    Represents a page of content:\n    * title: str\n    * icon: core.viewmodels.Icon\n    * headline: str\n    * paragraphs: str[]\n    * form: django.forms.Form\n    * forms: django.forms.Form[]\n    * button: core.viewmodels.Button\n    * buttons: core.viewmodels.Button[]\n    * classes: str[]\n    \"\"\"\n\n    def __init__(self, **kwargs):\n        self.title = kwargs.get(\"title\")\n        if self.title is None:\n            self.title = _(\"core.pages.index.prefix\")\n        else:\n            self.title = f\"{_('core.pages.index.prefix')}: {self.title}\"\n\n        self.icon = kwargs.get(\"icon\")\n        self.headline = kwargs.get(\"headline\")\n        self.paragraphs = kwargs.get(\"paragraphs\", [])\n        self.steps = kwargs.get(\"steps\")\n\n        self.forms = kwargs.get(\"forms\", [])\n        if not isinstance(self.forms, list):\n            self.forms = [self.forms]\n        if \"form\" in kwargs:\n            self.forms.append(kwargs.get(\"form\"))\n\n        self.buttons = kwargs.get(\"buttons\", [])\n        if not isinstance(self.buttons, list):\n            self.buttons = [self.buttons]\n        if \"button\" in kwargs:\n            self.buttons.append(kwargs.get(\"button\"))\n\n        self.classes = kwargs.get(\"classes\", [])\n        if not isinstance(self.classes, list):\n            self.classes = self.classes.split(\" \")\n\n    def context_dict(self):\n        \"\"\"Return a context dict for a Page.\"\"\"\n        return {\"page\": self}\n\n\nclass ErrorPage(Page):\n    \"\"\"\n    Represents an error page:\n    * title: str\n    * icon: core.viewmodels.Icon\n    * headline: str\n    * paragraphs: str[]\n    * button: core.viewmodels.Button\n    \"\"\"\n\n    def __init__(self, **kwargs):\n        super().__init__(\n            title=kwargs.get(\"title\", _(\"core.pages.error.title\")),\n            icon=kwargs.get(\"icon\", Icon(\"sadbus\", pgettext(\"image alt text\", \"core.icons.sadbus\"))),\n            headline=kwargs.get(\"headline\", _(\"core.pages.error.title\")),\n            paragraphs=kwargs.get(\"paragraphs\", [_(\"core.pages.server_error.headline\")]),\n            button=kwargs.get(\"button\"),\n        )\n\n    @staticmethod\n    def user_error(\n        title=_(\"core.pages.user_error.title\"),\n        headline=_(\"core.pages.user_error.headline\"),\n        paragraphs=[_(\"core.pages.user_error.p[0]\")],\n        **kwargs,\n    ):\n        \"\"\"Create a new core.viewmodels.ErrorPage instance with defaults for a user error.\"\"\"\n        return ErrorPage(title=title, headline=headline, paragraphs=paragraphs, **kwargs)\n\n    @staticmethod\n    def server_error(\n        title=_(\"core.pages.server_error.title\"),\n        headline=_(\"core.pages.server_error.title\"),\n        paragraphs=[_(\"core.pages.server_error.p[0]\")],\n        **kwargs,\n    ):\n        \"\"\"Create a new core.viewmodels.ErrorPage instance with defaults for a generic server error.\"\"\"\n        return ErrorPage(title=title, headline=headline, paragraphs=paragraphs, **kwargs)\n\n    @staticmethod\n    def not_found(\n        title=_(\"core.pages.not_found.title\"),\n        headline=_(\"core.pages.not_found.headline\"),\n        paragraphs=[_(\"core.pages.not_found.p[0]\")],\n        **kwargs,\n    ):\n        \"\"\"Create a new core.viewmodels.ErrorPage with defaults for a 404.\"\"\"\n        path = kwargs.pop(\"path\", None)\n        if path and title:\n            title = f\"{title}: {path}\"\n        elif path and not title:\n            title = path\n        return ErrorPage(title=title, headline=headline, paragraphs=paragraphs, **kwargs)\n\n\nclass PaymentProcessor:\n    \"\"\"\n    Represents a core.models.PaymentProcessor:\n    * model: core.models.PaymentProcessor\n    * access_token_url: str\n    * element_id: str\n    * color: str\n    * [name: str]\n    * [loading_text: str]\n    \"\"\"\n\n    def __init__(self, model, access_token_url, element_id, color, name=None, loading_text=_(\"core.buttons.wait\")):\n        if isinstance(model, models.PaymentProcessor):\n            self.access_token_url = access_token_url\n            self.element_id = element_id\n            self.color = color\n            self.name = name or model.name\n            self.loading_text = loading_text\n            self.card_tokenize_url = model.card_tokenize_url\n            self.card_tokenize_func = model.card_tokenize_func\n            self.card_tokenize_env = model.card_tokenize_env\n\n    def context_dict(self):\n        \"\"\"Return a context dict for a PaymentProcessor.\"\"\"\n        return {\"payment_processor\": self}\n\n\nclass TransitAgency:\n    \"\"\"\n    Represents a core.models.TransitAgency:\n    * model: core.models.TransitAgency\n    \"\"\"\n\n    def __init__(self, model):\n        if isinstance(model, models.TransitAgency):\n            self.slug = model.slug\n            self.short_name = model.short_name\n            self.long_name = model.long_name\n            self.agency_id = model.agency_id\n            self.merchant_id = model.merchant_id\n            self.info_url = model.info_url\n            self.phone = model.phone\n\n    def context_dict(self):\n        \"\"\"Return a context dict for a TransitAgency.\"\"\"\n        return {\"agency\": self}\n", "path": "benefits/core/viewmodels.py"}], "after_files": [{"content": "\"\"\"\nThe core application: view model definitions for the root of the webapp.\n\"\"\"\nfrom django.utils.translation import pgettext, gettext_lazy as _\nfrom django.urls import reverse\n\nfrom benefits.core import models\n\nfrom . import session\n\n\nclass Button:\n    \"\"\"\n    Represents a clickable button as styled <a> element (with optional label, optional transparent fallback text):\n    * classes: str, str[]\n    * id: str\n    * fallback_text: str\n    * label: str\n    * text: str\n    * url: str\n    * target: str\n    * rel: str\n    \"\"\"\n\n    def __init__(self, **kwargs):\n        classes = kwargs.get(\"classes\", [])\n        if isinstance(classes, str):\n            classes = classes.split()\n\n        self.classes = [\"btn\", \"btn-lg\"]\n        self.classes.extend(classes)\n        self.id = kwargs.get(\"id\")\n        self.fallback_text = kwargs.get(\"fallback_text\")\n        self.label = kwargs.get(\"label\")\n        self.text = kwargs.get(\"text\", \"Button\")\n        self.url = kwargs.get(\"url\")\n        self.target = kwargs.get(\"target\")\n        self.rel = kwargs.get(\"rel\")\n\n    @staticmethod\n    def agency_contact_links(agency):\n        \"\"\"Create link buttons for agency contact information.\"\"\"\n        return [\n            Button.link(classes=\"agency\", label=agency.long_name, text=agency.phone, url=f\"tel:{agency.phone}\"),\n            Button.link(\n                classes=\"agency\", text=agency.info_url, url=agency.info_url, target=\"_blank\", rel=\"noopener noreferrer\"\n            ),\n        ]\n\n    @staticmethod\n    def home(request, text=None):\n        \"\"\"Create a button back to this session's origin.\"\"\"\n        if text is None:\n            text = _(\"core.buttons.return_home\")\n\n        return Button.primary(text=text, url=session.origin(request))\n\n    @staticmethod\n    def link(**kwargs):\n        classes = kwargs.pop(\"classes\", [])\n        if isinstance(classes, str):\n            classes = classes.split(\" \")\n        classes.insert(0, \"btn-link\")\n        return Button(classes=classes, **kwargs)\n\n    @staticmethod\n    def primary(**kwargs):\n        classes = kwargs.pop(\"classes\", [])\n        if isinstance(classes, str):\n            classes = classes.split(\" \")\n        classes.insert(0, \"btn-primary\")\n        return Button(classes=classes, **kwargs)\n\n    @staticmethod\n    def outline_primary(**kwargs):\n        classes = kwargs.pop(\"classes\", [])\n        if isinstance(classes, str):\n            classes = classes.split(\" \")\n        classes.insert(0, \"btn-outline-primary\")\n        return Button(classes=classes, **kwargs)\n\n    @staticmethod\n    def login(**kwargs):\n        \"\"\"Create a login.gov button, with a login.gov logo and fallback text\"\"\"\n        btn = Button.primary(fallback_text=\"Login.gov\", id=\"login\", **kwargs)\n        return btn\n\n    @staticmethod\n    def logout(**kwargs):\n        \"\"\"Create a button that logs user out, with a login.gov button, with a login.gov logo and fallback text\"\"\"\n        btn = Button.primary(fallback_text=\"Login.gov\", id=\"login\", url=reverse(\"oauth:logout\"), text=\"\", **kwargs)\n        return btn\n\n    @staticmethod\n    def previous_page(url):\n        return Button(text=_(\"core.buttons.previous_page\"), url=url)\n\n\nclass Icon:\n    \"\"\"Represents an icon.\"\"\"\n\n    def __init__(self, icon, alt):\n        self.src = f\"img/icon/{icon}.svg\"\n        self.alt = alt\n\n\nclass MediaItem:\n    \"\"\"\n    Represents a media item in a list of items:\n    * icon: core.viewmodels.Icon\n    * details: str, str[]\n    * heading: str\n    * bullets: str, str[]\n    \"\"\"\n\n    def __init__(self, icon: Icon, details, heading=None, bullets=None):\n        self.icon = icon\n        if isinstance(details, str):\n            self.details = [details]\n        elif isinstance(details, list):\n            self.details = details\n        else:\n            self.details = [str(details)]\n        self.heading = heading\n        if isinstance(bullets, str):\n            self.bullets = [bullets]\n        elif isinstance(bullets, list):\n            self.bullets = bullets\n\n\nclass Page:\n    \"\"\"\n    Represents a page of content:\n    * title: str\n    * icon: core.viewmodels.Icon\n    * headline: str\n    * paragraphs: str[]\n    * form: django.forms.Form\n    * forms: django.forms.Form[]\n    * button: core.viewmodels.Button\n    * buttons: core.viewmodels.Button[]\n    * classes: str[]\n    \"\"\"\n\n    def __init__(self, **kwargs):\n        self.title = kwargs.get(\"title\")\n        if self.title is None:\n            self.title = _(\"core.pages.index.prefix\")\n        else:\n            self.title = f\"{_('core.pages.index.prefix')}: {self.title}\"\n\n        self.icon = kwargs.get(\"icon\")\n        self.headline = kwargs.get(\"headline\")\n        self.paragraphs = kwargs.get(\"paragraphs\", [])\n        self.steps = kwargs.get(\"steps\")\n\n        self.forms = kwargs.get(\"forms\", [])\n        if not isinstance(self.forms, list):\n            self.forms = [self.forms]\n        if \"form\" in kwargs:\n            self.forms.append(kwargs.get(\"form\"))\n\n        self.buttons = kwargs.get(\"buttons\", [])\n        if not isinstance(self.buttons, list):\n            self.buttons = [self.buttons]\n        if \"button\" in kwargs:\n            self.buttons.append(kwargs.get(\"button\"))\n\n        self.classes = kwargs.get(\"classes\", [])\n        if not isinstance(self.classes, list):\n            self.classes = self.classes.split(\" \")\n\n    def context_dict(self):\n        \"\"\"Return a context dict for a Page.\"\"\"\n        return {\"page\": self}\n\n\nclass ErrorPage(Page):\n    \"\"\"\n    Represents an error page:\n    * title: str\n    * icon: core.viewmodels.Icon\n    * headline: str\n    * paragraphs: str[]\n    * button: core.viewmodels.Button\n    \"\"\"\n\n    def __init__(self, **kwargs):\n        super().__init__(\n            title=kwargs.get(\"title\", _(\"core.pages.error.title\")),\n            icon=kwargs.get(\"icon\", Icon(\"sadbus\", pgettext(\"image alt text\", \"core.icons.sadbus\"))),\n            headline=kwargs.get(\"headline\", _(\"core.pages.error.title\")),\n            paragraphs=kwargs.get(\"paragraphs\", [_(\"core.pages.server_error.headline\")]),\n            button=kwargs.get(\"button\"),\n        )\n\n    @staticmethod\n    def user_error(\n        title=_(\"core.pages.user_error.title\"),\n        headline=_(\"core.pages.user_error.headline\"),\n        paragraphs=[_(\"core.pages.user_error.p[0]\")],\n        **kwargs,\n    ):\n        \"\"\"Create a new core.viewmodels.ErrorPage instance with defaults for a user error.\"\"\"\n        return ErrorPage(title=title, headline=headline, paragraphs=paragraphs, **kwargs)\n\n    @staticmethod\n    def server_error(\n        title=_(\"core.pages.server_error.title\"),\n        headline=_(\"core.pages.server_error.title\"),\n        paragraphs=[_(\"core.pages.server_error.p[0]\")],\n        **kwargs,\n    ):\n        \"\"\"Create a new core.viewmodels.ErrorPage instance with defaults for a generic server error.\"\"\"\n        return ErrorPage(title=title, headline=headline, paragraphs=paragraphs, **kwargs)\n\n    @staticmethod\n    def not_found(\n        title=_(\"core.pages.not_found.title\"),\n        headline=_(\"core.pages.not_found.headline\"),\n        paragraphs=[_(\"core.pages.not_found.p[0]\")],\n        **kwargs,\n    ):\n        \"\"\"Create a new core.viewmodels.ErrorPage with defaults for a 404.\"\"\"\n        path = kwargs.pop(\"path\", None)\n        if path and title:\n            title = f\"{title}: {path}\"\n        elif path and not title:\n            title = path\n        return ErrorPage(title=title, headline=headline, paragraphs=paragraphs, **kwargs)\n\n\nclass PaymentProcessor:\n    \"\"\"\n    Represents a core.models.PaymentProcessor:\n    * model: core.models.PaymentProcessor\n    * access_token_url: str\n    * element_id: str\n    * color: str\n    * [name: str]\n    * [loading_text: str]\n    \"\"\"\n\n    def __init__(self, model, access_token_url, element_id, color, name=None, loading_text=_(\"core.buttons.wait\")):\n        if isinstance(model, models.PaymentProcessor):\n            self.access_token_url = access_token_url\n            self.element_id = element_id\n            self.color = color\n            self.name = name or model.name\n            self.loading_text = loading_text\n            self.card_tokenize_url = model.card_tokenize_url\n            self.card_tokenize_func = model.card_tokenize_func\n            self.card_tokenize_env = model.card_tokenize_env\n\n    def context_dict(self):\n        \"\"\"Return a context dict for a PaymentProcessor.\"\"\"\n        return {\"payment_processor\": self}\n\n\nclass TransitAgency:\n    \"\"\"\n    Represents a core.models.TransitAgency:\n    * model: core.models.TransitAgency\n    \"\"\"\n\n    def __init__(self, model):\n        if isinstance(model, models.TransitAgency):\n            self.slug = model.slug\n            self.short_name = model.short_name\n            self.long_name = model.long_name\n            self.agency_id = model.agency_id\n            self.merchant_id = model.merchant_id\n            self.info_url = model.info_url\n            self.phone = model.phone\n\n    def context_dict(self):\n        \"\"\"Return a context dict for a TransitAgency.\"\"\"\n        return {\"agency\": self}\n", "path": "benefits/core/viewmodels.py"}]}