import { AcksPartySheet } from "./dialog/party-sheet.js"; export const addControl = (object, html) => { let control = ``; html.find(".fas.fa-search").replaceWith($(control)) html.find('.acks-party-sheet').click(ev => { showPartySheet(object); }) } export const showPartySheet = (object) => { event.preventDefault(); new AcksPartySheet(object, { top: window.screen.height / 2 - 180, left:window.screen.width / 2 - 140, }).render(true); } export const update = (actor, data) => { if (actor.getFlag('acks', 'party')) { Object.values(ui.windows).forEach(w => { if (w instanceof AcksPartySheet) { w.render(true); } }) } }