// src/ids.ts
import { Schema } from "effect";
var IntegrationSlug = Schema.String.pipe(Schema.brand("IntegrationSlug"));
var AuthTemplateSlug = Schema.String.pipe(Schema.brand("AuthTemplateSlug"));
var NO_AUTH_TEMPLATE = AuthTemplateSlug.make("none");
var ConnectionName = Schema.String.pipe(Schema.brand("ConnectionName"));
var OAuthClientSlug = Schema.String.pipe(Schema.brand("OAuthClientSlug"));
var OAuthState = Schema.String.pipe(Schema.brand("OAuthState"));
var ProviderKey = Schema.String.pipe(Schema.brand("ProviderKey"));
var ProviderItemId = Schema.String.pipe(Schema.brand("ProviderItemId"));
var ConnectionAddress = Schema.String.pipe(Schema.brand("ConnectionAddress"));
var ToolAddress = Schema.String.pipe(Schema.brand("ToolAddress"));
var ToolName = Schema.String.pipe(Schema.brand("ToolName"));
var ElicitationId = Schema.String.pipe(Schema.brand("ElicitationId"));
var PolicyId = Schema.String.pipe(Schema.brand("PolicyId"));
var Tenant = Schema.String.pipe(Schema.brand("Tenant"));
var Subject = Schema.String.pipe(Schema.brand("Subject"));
var Owner = Schema.Literals(["org", "user"]);

// src/connection-name-identifier.ts
var isConnectionIdentifier = (value) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(value);
var connectionIdentifier = (input, fallback = "connection") => {
  const words = input.toLowerCase().match(/[a-z0-9]+/g);
  const base = words?.map(
    (word, index) => index === 0 ? word : `${word[0]?.toUpperCase() ?? ""}${word.slice(1)}`
  ).join("") || fallback;
  return ConnectionName.make(
    /^[A-Za-z_$]/.test(base) ? base : `${fallback}${base[0]?.toUpperCase() ?? ""}${base.slice(1)}`
  );
};

export {
  IntegrationSlug,
  AuthTemplateSlug,
  NO_AUTH_TEMPLATE,
  ConnectionName,
  OAuthClientSlug,
  OAuthState,
  ProviderKey,
  ProviderItemId,
  ConnectionAddress,
  ToolAddress,
  ToolName,
  ElicitationId,
  PolicyId,
  Tenant,
  Subject,
  Owner,
  isConnectionIdentifier,
  connectionIdentifier
};
//# sourceMappingURL=chunk-7GJMCW76.js.map