// Where picked bytes are kept: the store a photo or file column's reference// is answered by, in the environment.importCottonValuesimportSwiftUI/// Where picked bytes are kept, and where a kept reference can be read back.publicprotocolAttachmentStore: Sendable {/// Keeps the file at `url` and answers its reference for a `type` column/// (`.photo` or `.file`).func store(fileAt url: URL, name: String?, for type: ColumnType) asyncthrows -> AttachmentValue/// A local file holding `ref`'s bytes, when this device has them.func localURL(for ref: String) async -> URL?/// Explicit single-file fetch, never called by an editor thumbnail.func ensure(for ref: String) asyncthrows -> URL?}extensionAttachmentStore {publicfunc ensure(for ref: String) asyncthrows -> URL? { await localURL(for: ref) }}extensionEnvironmentValues { @Entry publicvar attachmentStore: (any AttachmentStore)? = nil}