{{#let currentNode=this.currentNode.get}}
{{#if (and (not this.root) (ne this.search false))}}
{{#inputText
label=this.label
labelClass='tree-search'
placeholder=(choose this.searchPlaceholder 'Search')
}}
{{/inputText}}
{{/if}}
{{#if this.root}}
{{>selectTreeBreadcrumb component=this.component}}
{{/if}}
{{#each item in treeItems}}
{{>inputRadio
id=(concat this.storageKey '_' (encodeId item.value))
class=this.radioClass
name=this.key
itemData=item
value=item.value
label=item.label
labelClass=(valueIf (isArray item.items) 'tree-node' 'tree-leaf')
checked=(eq item.value (reactive this.value))
}}
{{/each}}
{{#if (and currentNode (isArray currentNode.items))}}
{{>selectTree (clone this
items=currentNode.items
root=(choose this.root this.component)
class='select-tree-node'
)}}
{{/if}}
{{/let}}
{{#if (and (not this.root) (or this.storageKey this.commonItems))}}
{{>selectTreeCommon (clone this component=this.component treeInstance=instance)}}
{{/if}}
{{/group}}