/*
 * Copyright (C) 2016-2020 Kano Computing Ltd.
 * License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
 */
import { directive } from 'lit-html/lit-html.js';
const templateMap = new WeakMap();
export const templateContent = directive((template) => (part) => {
    if (templateMap.get(part) === template) {
        return;
    }
    templateMap.set(part, template);
    const content = template.cloneNode(true).content;
    part.setValue(content);
    part.commit();
});
//# sourceMappingURL=template-content.js.map