import { SemanticType } from '../Semantics.js';
/**
 * Type guard to check if a semantic is a URL semantic.
 */
export const isURLSemantic = (semantic) => {
    return semantic.id === SemanticType.URL;
};
/**
 * Helper function to create a URL semantic with configuration.
 */
export const createURLSemantic = (config = {}) => {
    const mergedConfig = {
        ...DEFAULT_URL_CONFIG,
        ...config,
    };
    if (config.metadata) {
        mergedConfig.metadata = { ...config.metadata };
    }
    return {
        id: SemanticType.URL,
        config: mergedConfig,
    };
};
/**
 * Default configuration for URL semantic.
 */
export const DEFAULT_URL_CONFIG = {
    requireHttps: false,
    allowQueryParams: true,
    allowFragments: true,
    allowInternational: true,
    allowIP: true,
    allowPort: true,
    allowAuthentication: false,
};
//# sourceMappingURL=URL.js.map