[# import pb-tify if we're in document view and pb-tify is enabled %]
[% template scripts %]
[% if ($context?isStatic or exists($context?doc)) and $context?features?iiif?enabled and $context?features?iiif?viewer = "pb-tify" %]
[% if $script?webcomponents = 'dev' %]
[% elif $script?webcomponents = 'local' %]
[% elif $script?webcomponents = '' %]
[% else %]
[% endif %]
[% endif %]
[% endtemplate %]
[% template after %]
[% if ($context?isStatic or exists($context?doc)) and $context?features?iiif?enabled %]
[% if $context?features?iiif?viewer = "pb-tify" %]
[% else %]
[% endif %]
[% endif %]
[% endtemplate %]