const footprintNode = flux.getNodeById("bd79d98f-3542-c68b-7d08-c8a9fe1b19d2") as PcbLayoutNode;
const modelNode = flux.getNodeById("03889df1-6435-acaa-19c8-c65242c5255a") as PcbLayoutNode;
// This will return array of all assets with file type .kicad_mod
const footprintAssetNotSorted = flux.assets.filter((asset) => asset.fileType === "kicad_mod").map((asset) => asset.name);
const footprintAssetId = footprintAssetNotSorted.sort();
// This will return array of all assets with file type .step
const modelAssetIdNotSorted = flux.assets.filter((asset) => asset.fileType === "step").map((asset) => asset.name);
const modelAssetId = modelAssetIdNotSorted.sort();
if (footprintNode || modelNode) {
const assetFootprintRule = footprintNode.rules.find((rule) => rule.key === "asset");
const assetModelRule = modelNode.rules.find((rule) => rule.key === "asset");
flux.on("setup", () => {
const property = flux.properties.find((prop) => prop.name === "Package");
if (property) {
changeFootprintAsset(property.value);
changeModelAsset(property.value)
}
});