/*! For license information please see if-defined.js.LICENSE.txt */
import{AttributePart as e,directive as t}from"../lit-html.js";const o=new WeakMap;export const ifDefined=t((t=>i=>{const m=o.get(i);if(void 0===t&&i instanceof e){if(void 0!==m||!o.has(i)){const e=i.committer.name;i.committer.element.removeAttribute(e)}}else t!==m&&i.setValue(t);o.set(i,t)}));