+ {/* Name */}
+
+ NAME
+ patchBucket(editingBucket.id, { name: val })}
+ className="text-red-500 font-mono font-bold"
+ />
+
+
+ {/* Type */}
+
+ TYPE
+ patchBucket(editingBucket.id, { type: val })}
+ displayLabel={editingBucket.type_label}
+ disabled={editingBucket.type === 'overflow'}
+ className="text-red-500 font-mono"
+ />
+
+
+ {/* Allocation Type */}
+
+ ALLOCATION
+ patchBucket(editingBucket.id, { allocation_type: val, allocation_value: null })}
+ displayLabel={editingBucket.allocation_type_label}
+ disabled={editingBucket.type === 'overflow'}
+ className="text-red-500 font-mono"
+ />
+
+
+ {/* Allocation Value */}
+ {editingBucket.allocation_type !== 'unlimited' && (
+
+ VALUE
+
+ {editingBucket.allocation_type === 'fixed_limit' ? (
+ patchBucket(editingBucket.id, { allocation_value: dollarsToCents(val) })}
+ formatDisplay={(v) => `$${v.toFixed(2)}`}
+ min={0}
+ step="0.01"
+ />
+ ) : (
+ patchBucket(editingBucket.id, { allocation_value: percentToBasisPoints(val) })}
+ formatDisplay={(v) => `${v.toFixed(2)}%`}
+ min={0}
+ step="0.01"
+ />
+ )}
+
+
+ )}
+
+ {/* Current Balance */}
+
+ CURRENT
+ patchBucket(editingBucket.id, { starting_amount: dollarsToCents(val) })}
+ formatDisplay={(v) => `$${v.toFixed(2)}`}
+ min={0}
+ step="0.01"
+ className="font-digital text-red-500"
+ />
+
+
+ {/* Buffer */}
+ {editingBucket.allocation_type === 'fixed_limit' && (
+
+ BUFFER
+ patchBucket(editingBucket.id, { buffer_multiplier: val })}
+ formatDisplay={(v) => v > 0 ? `${v}x` : 'NONE'}
+ min={0}
+ step="0.01"
+ className="font-digital text-red-500"
+ />
+
+ )}
+
+ {/* Priority */}
+
+
PRIORITY
+
+
+ #{editingBucket.priority}
+
+
+
+
+ {/* Delete */}
+ {editingBucket.type !== 'overflow' && (
+
+
+
+ )}
+