2023-05-05 13:20:35 -04:00
|
|
|
|
import { computed } from "@ember/object";
|
2024-11-29 15:42:50 +00:00
|
|
|
|
import { classNames } from "@ember-decorators/component";
|
2023-05-05 13:20:35 -04:00
|
|
|
|
import I18n from "I18n";
|
2024-01-16 17:51:44 +01:00
|
|
|
|
import ComboBoxComponent from "select-kit/components/combo-box";
|
2024-11-29 15:42:50 +00:00
|
|
|
|
import {
|
|
|
|
|
|
pluginApiIdentifiers,
|
|
|
|
|
|
selectKitOptions,
|
|
|
|
|
|
} from "select-kit/components/select-kit";
|
2023-05-05 13:20:35 -04:00
|
|
|
|
|
2024-11-29 15:42:50 +00:00
|
|
|
|
@pluginApiIdentifiers("subscribe-us-state-select")
|
|
|
|
|
|
@selectKitOptions({
|
|
|
|
|
|
filterable: true,
|
|
|
|
|
|
allowAny: false,
|
|
|
|
|
|
translatedNone: I18n.t(
|
|
|
|
|
|
"discourse_subscriptions.subscribe.cardholder_address.state"
|
|
|
|
|
|
),
|
|
|
|
|
|
})
|
|
|
|
|
|
@classNames("subscribe-address-state-select")
|
|
|
|
|
|
export default class SubscribeUsStateSelect extends ComboBoxComponent {
|
|
|
|
|
|
nameProperty = "name";
|
|
|
|
|
|
valueProperty = "value";
|
2023-05-05 13:20:35 -04:00
|
|
|
|
|
2024-11-29 15:42:50 +00:00
|
|
|
|
@computed
|
|
|
|
|
|
get content() {
|
2023-05-05 13:20:35 -04:00
|
|
|
|
return [
|
|
|
|
|
|
["AL", "Alabama"],
|
|
|
|
|
|
["AK", "Alaska"],
|
|
|
|
|
|
["AZ", "Arizona"],
|
|
|
|
|
|
["AR", "Arkansas"],
|
|
|
|
|
|
["CA", "California"],
|
|
|
|
|
|
["CO", "Colorado"],
|
|
|
|
|
|
["CT", "Connecticut"],
|
|
|
|
|
|
["DE", "Delaware"],
|
|
|
|
|
|
["US", "District"],
|
|
|
|
|
|
["FL", "Florida"],
|
|
|
|
|
|
["GA", "Georgia"],
|
|
|
|
|
|
["HI", "Hawaii"],
|
|
|
|
|
|
["ID", "Idaho"],
|
|
|
|
|
|
["IL", "Illinois"],
|
|
|
|
|
|
["IN", "Indiana"],
|
|
|
|
|
|
["IA", "Iowa"],
|
|
|
|
|
|
["KS", "Kansas"],
|
|
|
|
|
|
["KY", "Kentucky"],
|
|
|
|
|
|
["LA", "Louisiana"],
|
|
|
|
|
|
["ME", "Maine"],
|
|
|
|
|
|
["MD", "Maryland"],
|
|
|
|
|
|
["MA", "Massachusetts"],
|
|
|
|
|
|
["MI", "Michigan"],
|
|
|
|
|
|
["MN", "Minnesota"],
|
|
|
|
|
|
["MS", "Mississippi"],
|
|
|
|
|
|
["MO", "Missouri"],
|
|
|
|
|
|
["MT", "Montana"],
|
|
|
|
|
|
["NE", "Nebraska"],
|
|
|
|
|
|
["NV", "Nevada"],
|
|
|
|
|
|
["NH", "New Hampshire"],
|
|
|
|
|
|
["NJ", "New Jersey"],
|
|
|
|
|
|
["NM", "New Mexico"],
|
|
|
|
|
|
["NY", "New York"],
|
|
|
|
|
|
["NC", "North Carolina"],
|
|
|
|
|
|
["ND", "North Dakota"],
|
|
|
|
|
|
["OH", "Ohio"],
|
|
|
|
|
|
["OK", "Oklahoma"],
|
|
|
|
|
|
["OR", "Oregon"],
|
|
|
|
|
|
["PA", "Pennsylvania"],
|
|
|
|
|
|
["RI", "Rhode"],
|
|
|
|
|
|
["SC", "South"],
|
|
|
|
|
|
["SD", "South"],
|
|
|
|
|
|
["TN", "Tennessee"],
|
|
|
|
|
|
["TX", "Texas"],
|
|
|
|
|
|
["UT", "Utah"],
|
|
|
|
|
|
["VT", "Vermont"],
|
|
|
|
|
|
["VA", "Virginia"],
|
|
|
|
|
|
["WA", "Washington"],
|
|
|
|
|
|
["WV", "West"],
|
|
|
|
|
|
["WI", "Wisconsin"],
|
|
|
|
|
|
["WY", "Wyoming"],
|
|
|
|
|
|
["AS", "American Samoa"],
|
|
|
|
|
|
["GU", "Guam"],
|
|
|
|
|
|
["MP", "Northern Mariana Islands"],
|
|
|
|
|
|
["PR", "Puerto Rico"],
|
|
|
|
|
|
["VI", "U.S. Virgin Islands"],
|
|
|
|
|
|
["UM", "U.S. Minor Outlying Islands"],
|
|
|
|
|
|
["MH", "Marshall Islands"],
|
|
|
|
|
|
["FM", "Micronesia"],
|
|
|
|
|
|
["PW", "Palau"],
|
|
|
|
|
|
["AA", "U.S. Armed Forces – Americas"],
|
|
|
|
|
|
["AE", "U.S. Armed Forces – Europe"],
|
|
|
|
|
|
["AP", "U.S. Armed Forces – Pacific"],
|
|
|
|
|
|
].map((arr) => {
|
|
|
|
|
|
return { value: arr[0], name: arr[1] };
|
|
|
|
|
|
});
|
2024-11-29 15:42:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|