@if (tab === 'add') {

Select layers to rename (otherwise it will apply to all layers) and enter the text you want to add.

Previsualization:

} @if (tab === 'replace') {

Select layers to rename (otherwise it will apply to all layers) and enter the replacement text.

Previsualization:

}