namespace SeaHaven.DataServices.Helpers { public static class WorkOrderBoardRegions { public static readonly IReadOnlyList Names = ["East", "Central", "West", "California", "Unmapped/Other"]; private static readonly IReadOnlyDictionary RegionStateCodes = new Dictionary(StringComparer.Ordinal) { ["East"] = ["CT", "DE", "GA", "ME", "MD", "MA", "NH", "NJ", "NY", "NC", "PA", "RI", "SC", "VT", "VA", "WV"], ["Central"] = ["AL", "AR", "FL", "IL", "IN", "IA", "KS", "KY", "LA", "MI", "MN", "MS", "MO", "NE", "ND", "OH", "OK", "SD", "TN", "WI"], ["West"] = ["AK", "AZ", "CO", "HI", "ID", "MT", "NV", "NM", "OR", "TX", "UT", "WA", "WY"], ["California"] = ["CA"] }; private static readonly IReadOnlyDictionary StateNames = new Dictionary(StringComparer.Ordinal) { ["AL"] = "ALABAMA", ["AK"] = "ALASKA", ["AZ"] = "ARIZONA", ["AR"] = "ARKANSAS", ["CA"] = "CALIFORNIA", ["CO"] = "COLORADO", ["CT"] = "CONNECTICUT", ["DE"] = "DELAWARE", ["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 ISLAND", ["SC"] = "SOUTH CAROLINA", ["SD"] = "SOUTH DAKOTA", ["TN"] = "TENNESSEE", ["TX"] = "TEXAS", ["UT"] = "UTAH", ["VT"] = "VERMONT", ["VA"] = "VIRGINIA", ["WA"] = "WASHINGTON", ["WV"] = "WEST VIRGINIA", ["WI"] = "WISCONSIN", ["WY"] = "WYOMING" }; public static IReadOnlyCollection StorageValuesFor(string region) => RegionStateCodes.TryGetValue(region, out var codes) ? codes.SelectMany(code => new[] { code, StateNames[code] }).ToArray() : Array.Empty(); public static IReadOnlySet KnownStorageValues { get; } = RegionStateCodes.Values .SelectMany(codes => codes.SelectMany(code => new[] { code, StateNames[code] })) .ToHashSet(StringComparer.Ordinal); } }