');
          $todoTitle.classList.add('todo__title');
          const title = $todoInput.value.trim();

          if (title) {
            $todoTitle.textContent = $todoInput.value;
            $todo.removeChild($todoInput);
            $todo.prepend($todoTitle);
          }
        }
      };

      const handleTodoDeleteClick = event => {
        event.stopPropagation();

        const $deleteButton = event.currentTarget;
        const $todo = $deleteButton.parentElement.parentElement;
 