package p.studio.compiler.pbs.semantics;

import p.studio.compiler.source.identifiers.NameId;

record PbsCallableScope(
        String label,
        String scopeKind,
        NameId ownerNameId) {

    static PbsCallableScope topLevelFunctions() {
        return new PbsCallableScope("top-level callable scope", "top-level", null);
    }

    static PbsCallableScope structMethods(final NameId ownerNameId) {
        return new PbsCallableScope("struct method scope", "struct", ownerNameId);
    }

    static PbsCallableScope structCtors(final NameId ownerNameId) {
        return new PbsCallableScope("struct constructor scope", "ctor", ownerNameId);
    }

    static PbsCallableScope serviceMethods(final NameId ownerNameId) {
        return new PbsCallableScope("service method scope", "service", ownerNameId);
    }

    static PbsCallableScope contractSignatures(final NameId ownerNameId) {
        return new PbsCallableScope("contract signature scope", "contract", ownerNameId);
    }

    static PbsCallableScope hostMethods(final NameId ownerNameId) {
        return new PbsCallableScope("host method scope", "host", ownerNameId);
    }

    static PbsCallableScope builtinMethods(final NameId ownerNameId) {
        return new PbsCallableScope("builtin method scope", "builtin", ownerNameId);
    }

    static PbsCallableScope implementsMethods(final NameId ownerNameId) {
        return new PbsCallableScope("implements method scope", "implements", ownerNameId);
    }
}
