public function setHook(string $hook, callable $callable): self
    {
        $availableHooks = [self::BEFORE_PAUSE_HOOK, self::AFTER_PAUSE_HOOK];

        if (!in_array($hook, $availableHooks)) {
            throw new \InvalidArgumentException('Invalid hook. Available hooks: ' . join(', ', $availableHooks));
        }

        $this->hooks[$hook] = $callable;
        return $this;
    }