export const InterfaceDriver = {
    /** Add an exported interface to a source file. Skips if it already exists (unless overwrite). */
    addInterface(sourceFile, interfaceName, properties, options = {}) {
        const existing = sourceFile.getInterface(interfaceName);
        if (existing) {
            if (options.overwrite)
                existing.remove();
            else
                return;
        }
        const declaration = sourceFile.addInterface({ name: interfaceName });
        declaration.addProperties(properties);
        declaration.setIsExported(true);
        return declaration;
    },
    addProperty(declaration, property) {
        declaration.addProperty(property);
        return declaration;
    },
    getInterface(sourceFile, interfaceName) {
        return sourceFile.getInterface(interfaceName);
    },
};
