• Shared createDialog implementation for SohlItem and SohlActor.

    Computes the allowed types (excluding the base document type, honoring an optional types restriction), decides whether to ask for the type and the subtype (a valid pre-seeded value locks/hides its field), renders the shared create dialog through the dialog boundary — wiring progressive subtypes via the render hook — and on confirm creates the document and opens its sheet.

    Parameters

    • cls: any

      The concrete document class (SohlItem / SohlActor).

    • data: PlainObject = {}

      Creation data; type / system.subType pre-seed and lock.

    • createOptions: PlainObject = {}

      Document creation options forwarded to create.

    • options: { types?: string[]; [k: string]: any } = {}

      Dialog options.

      • [k: string]: any
      • Optionaltypes?: string[]

        A restriction of the creatable document types.

    Returns Promise<any>

    The created document, or null if the dialog was dismissed.