You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: config_tls.go
    path of file: ./repos/benthos/public/service
    
    the code of the file until where you have to start completion: package service

import (
	"crypto/tls"
	"fmt"
	"strings"

	"gopkg.in/yaml.v3"

	"github.com/benthosdev/benthos/v4/internal/docs"
	btls "github.com/benthosdev/benthos/v4/internal/tls"
)

// NewTLSField defines a new object type config field that describes TLS
// settings for networked components. It is then possible to extract a
// *tls.Config from the resulting parsed config with the method FieldTL
    
func (p *ParsedConfig) FieldTLSToggled(path ...string) (tconf *tls.Config, enabled bool, err error) {
	v, exists := p.i.Field(path...)
	if !exists {
		return nil, false, fmt.Errorf("field '%v' was not found in the config", strings.Join(path, "."))
	}

	var node yaml.Node
	if err = node.Encode(v); err != nil {
		return
	}

	conf := btls.NewConfig()
	if err = node.Decode(&conf); err != nil {
		return
	}

	if enabled = conf.Enabled; !enabled {
		return
	}

	tconf, err = conf.Get(p.mgr.FS())
	return
}