/* * Copyright (c) 2025, Shannon Booth * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace URL::Pattern { // https://urlpattern.spec.whatwg.org/#typedefdef-urlpatterninput using Input = Variant; // https://urlpattern.spec.whatwg.org/#dictdef-urlpatternoptions struct Options { bool ignore_case { false }; }; // https://urlpattern.spec.whatwg.org/#dictdef-urlpatterncomponentresult struct ComponentResult { String input; OrderedHashMap> groups; }; // https://urlpattern.spec.whatwg.org/#dictdef-urlpatternresult struct Result { Vector inputs; ComponentResult protocol; ComponentResult username; ComponentResult password; ComponentResult hostname; ComponentResult port; ComponentResult pathname; ComponentResult search; ComponentResult hash; }; }